ttencate/jfxr

unable to run npm install / build in current nodejs

thmasn opened this issue · 1 comments


i am pretty sure, this is an update problem, that i am unable to resolve:

  • i am using npm: '8.11.0', node: '16.15.1'
  • when running npm install, it fails with the following error:
npm ERR! code 1
npm ERR! path /Users/tp/Documents/GitHub/jfxr/app/node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c node scripts/build.js
npm ERR! Building: /usr/local/bin/node /Users/tp/Documents/GitHub/jfxr/app/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
  • after updating the sass version, like so:
    "node-sass": "^7.0.1",
    "sass-loader": "^10.3.0",

npm install completes with 41 vulnerabilities

  • however, npm run build then fails with:
ERROR in ./css/index.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):
ValidationError: Invalid options object. Sass Loader has been initialized using an options object that does not match the API schema.

even updating "mini-css-extract-plugin": "^1.6.2" does not resolve this issue.

i tried several versions now, updating all the modules, running npm audit fix at several stages, but was unable to get a build.
i hope i am not missing something obvious here...

I switched it to sass (Dart Sass) which is better supported. Now also using yarn and committed yarn.lock. Much faster and more stable.

Other dependencies have not been updated, because I don't have time to wrangle new Webpack config versions and stuff like that. Since it just generates static assets, I'm not too worried about those vulnerabilities.