Build errors with unknown version of Samsung in Sanity project
8 replies
Last updated: May 2, 2020
E
π― I get build errors.
sanity startworks fine and i have tested on localhost but
sanity buildgives 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
M
Hi Carl, are you using one of the Sanity starters? Seems like an issue with
What versions of Sanity are you on (
browserlist. Have you created any entries for it in your
package.jsonfile? 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.jsonfile and your
node_modulesfolder, and running
npm installto see if this gets rid of any errors.
What versions of Sanity are you on (
sanity versions)?
Apr 23, 2020, 8:52 AM
P
Hi Carl, are you using one of the Sanity starters? Seems like an issue with
What versions of Sanity are you on (
browserlist. Have you created any entries for it in your
package.jsonfile? 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.jsonfile and your
node_modulesfolder, and running
npm installto see if this gets rid of any errors.
What versions of Sanity are you on (
sanity versions)?
Apr 23, 2020, 8:52 AM
C
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
P
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
C
π
Apr 23, 2020, 1:15 PM
I
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
I
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
I
But removing node_modules and
yarn installfixed 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.