Build fails with the existing package-lock.json
Closed this issue · 4 comments
StasDeep commented
I got this error when trying to build the assets with npm run deploy
/npm run watch
:
ERROR in ./css/app.scss
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
Error: Node Sass version 7.0.0 is incompatible with ^4.0.0.
at getSassImplementation (/Users/stanislau/code/listudy/assets/node_modules/sass-loader/dist/getSassImplementation.js:46:13)
at Object.loader (/Users/stanislau/code/listudy/assets/node_modules/sass-loader/dist/index.js:40:61)
at /Users/stanislau/code/listudy/assets/node_modules/webpack/lib/NormalModule.js:316:20
at /Users/stanislau/code/listudy/assets/node_modules/loader-runner/lib/LoaderRunner.js:367:11
at /Users/stanislau/code/listudy/assets/node_modules/loader-runner/lib/LoaderRunner.js:233:18
at runSyncOrAsync (/Users/stanislau/code/listudy/assets/node_modules/loader-runner/lib/LoaderRunner.js:143:3)
at iterateNormalLoaders (/Users/stanislau/code/listudy/assets/node_modules/loader-runner/lib/LoaderRunner.js:232:2)
at Array.<anonymous> (/Users/stanislau/code/listudy/assets/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
at Storage.finished (/Users/stanislau/code/listudy/assets/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
at /Users/stanislau/code/listudy/assets/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
at /Users/stanislau/code/listudy/assets/node_modules/graceful-fs/graceful-fs.js:123:16
at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3)
@ ./js/app.js 4:0-25
@ multi ./js/app.js
Child mini-css-extract-plugin node_modules/css-loader/dist/cjs.js!node_modules/sass-loader/dist/cjs.js!css/app.scss:
Entrypoint mini-css-extract-plugin = *
[./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./css/app.scss] 383 bytes {mini-css-extract-plugin} [built] [failed] [1 error]
ERROR in ./css/app.scss (./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./css/app.scss)
Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
Error: Node Sass version 7.0.0 is incompatible with ^4.0.0.
at getSassImplementation (/Users/stanislau/code/listudy/assets/node_modules/sass-loader/dist/getSassImplementation.js:46:13)
at Object.loader (/Users/stanislau/code/listudy/assets/node_modules/sass-loader/dist/index.js:40:61)
Managed to fix it by removing package-lock.json
and rerunning npm install
, which indicates that perhaps there's an issue with the lock file?
ArneVogel commented
I also encountered the problem just now. I ran npm update
and with the new package-log.json
I don't have the problem anymore.
StasDeep commented
@ArneVogel great, will you push the updated lock file to master?
ArneVogel commented
I already did. Can you check if that lock file works for you?
StasDeep commented
Looks to be working now, thanks!