Register now - Learn how Tecovas roped in success with Sanity and Shopify 🀠

Build errors with unknown version of Samsung in Sanity project

8 replies
Last updated: May 2, 2020
😯 I get build errors.
sanity start
works fine and i have tested on localhost but
sanity build
gives hundreds of errors I understand nothing of. Most of them semes to start with:
Module build failed: ModuleBuildError: Module build failed: BrowserslistError: Unknown version 4 of samsung at .../node_modules/browserslist/index.js
Apr 23, 2020, 8:20 AM
Hi Carl, are you using one of the Sanity starters? Seems like an issue with
browserlist
. Have you created any entries for it in your
package.json
file? You could try removing Browserlist for a moment to see if that makes the build complete successfully. Or otherwise, you could also try removing your
package-lock.json
file and your
node_modules
folder, and running
npm install
to see if this gets rid of any errors.
What versions of Sanity are you on (
sanity versions
)?
Apr 23, 2020, 8:52 AM
Hi Carl, are you using one of the Sanity starters? Seems like an issue with
browserlist
. Have you created any entries for it in your
package.json
file? You could try removing Browserlist for a moment to see if that makes the build complete successfully. Or otherwise, you could also try removing your
package-lock.json
file and your
node_modules
folder, and running
npm install
to see if this gets rid of any errors.
What versions of Sanity are you on (
sanity versions
)?
Apr 23, 2020, 8:52 AM
I have not done any changes to packages and least of all "browserlist", whatever that is πŸ’ I tried every way to clean, rollback, reinstall sanity but the thing that worked was to git-get to new folder. Exact same code. Works again 😌 Must have been something wrong in the node_module folder even though beyond compare says they are
===
. Β―\_(ツ)_/Β―
Apr 23, 2020, 12:18 PM
Mysterious πŸ•΅οΈβ€β™‚οΈ I guess we can shrug it off and claim the stars aligned against it, but do let us know if you run into this again πŸ˜‰ Thanks for reporting back btw.
Apr 23, 2020, 1:10 PM
πŸ‘
Apr 23, 2020, 1:15 PM
FFYI: Got the exact same error after doing
sanity upgrade
((at)sanity/core 1.149.11 => 1.149.12).


➜  studio git:(master) βœ— sanity deploy
βœ” Checking project info
βœ” Clearing output folder (2ms)
β Ό Building SanityYour current PostCSS version is 5.2.18, but cssnano uses 7.0.27. Perhaps this is the source of the error below.
βœ– Building Sanity

Error: Errors while building:
./node_modules/normalize.css/normalize.css
Module build failed: ModuleBuildError: Module build failed: BrowserslistError: Unknown version 4 of samsung

➜  studio git:(master) βœ— node -v && npm -v
v12.16.1
6.13.4
May 2, 2020, 11:19 AM
it also gave me some warnings when starting the studio locally:
 > sanity start

βœ” Checking configuration files...
β ‡ Compiling...webpack built ba3518f62a55f03ed301 in 12797ms
βœ” Compiling...
Compiled with warnings.

Warning in ./node_modules/moment/locale/en-SG.js
There are multiple modules with names that only differ in casing.
This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.
Use equal casing. Compare these module identifiers:
* /.../studio/node_modules/moment/locale/en-SG.js
    Used by 2 module(s), i. e.
    /.../studio/node_modules/moment/locale /en|nb/
* /.../studio/node_modules/moment/locale/en-sg.js
    Used by 2 module(s), i. e.
    /.../studio/node_modules/moment/locale /en|nb/
 @ ./node_modules/moment/locale/en-SG.js
 @ ./node_modules/moment/locale en|nb
 @ ./node_modules/moment/moment.js
 @ ./node_modules/@sanity/form-builder/lib/inputs/DateInputs/BaseDateTimeInput.js
 @ ./node_modules/@sanity/form-builder/lib/inputs/DateInputs/DateInput.js
 @ ./node_modules/@sanity/form-builder/lib/inputs/DateInputs/index.js
 @ ./node_modules/@sanity/form-builder/lib/sanity/inputResolver/defaultInputs.js
 @ ./node_modules/@sanity/form-builder/lib/sanity/inputResolver/inputResolver.js
 @ ./node_modules/@sanity/form-builder/lib/sanity/SanityFormBuilderContext.js
 @ ./node_modules/@sanity/form-builder/lib/sanity (part:@sanity/form-builder)
 @ ./node_modules/@sanity/desk-tool/lib/components/BrokenReferences.js
 @ ./node_modules/@sanity/desk-tool/lib/utils/withInitialValue.js
 @ ./node_modules/@sanity/desk-tool/lib/pane/DocumentPaneProvider.js
 @ ./node_modules/@sanity/desk-tool/lib/pane/Pane.js
 @ ./node_modules/@sanity/desk-tool/lib/DeskToolPanes.js
 @ ./node_modules/@sanity/desk-tool/lib/DeskTool.js
 @ ./node_modules/@sanity/desk-tool/lib/tool.js
 @ ./node_modules/@sanity/vision/lib/VisionTool.js (all:part:@sanity/base/tool)
 @ ./node_modules/@sanity/default-layout/lib/defaultLayoutRouter.js
 @ ./node_modules/@sanity/default-layout/lib/components/DefaultLayoutContainer.js (part:@sanity/base/root)
 @ ./node_modules/@sanity/base/lib/components/SanityRoot.js (part:@sanity/base/sanity-root)
 @ ./node_modules/@sanity/server/lib/browser/entry-dev.js
 @ multi ./node_modules/normalize.css/normalize.css ./node_modules/@sanity/server/lib/browser/entry-dev.js

Content Studio listening on <http://localhost:3333>
May 2, 2020, 11:20 AM
But removing node_modules and
yarn install
fixed it.
May 2, 2020, 11:20 AM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?