Trying to install dependencies for an existing project on my machine where I'm using WSL2 with Ubuntu 20.04. I'm hoping someone can help me understand the problem. Here are what I felt were the most relevant lines from the logs:
6003 verbose pkgid node-sass@4.14.1
6004 verbose cwd /home/...
6005 verbose Linux 5.10.60.1-microsoft-standard-WSL2
6006 verbose argv "/home/.../.nvm/versions/node/v16.14.0/bin/node" "/home/.../.nvm/versions/node/v16.14.0/bin/npm" "install"
6007 verbose node v16.14.0
6008 verbose npm v8.5.0
6009 error code 1
6010 error path /home/.../node_modules/node-sass
6011 error command failed
6012 error command sh -c node scripts/build.js
6013 error Building: /home/.../.nvm/versions/node/v16.14.0/bin/node /home/.../node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
...
6014 error gyp info spawn /usr/bin/python2
6014 error gyp info spawn args [
6014 error gyp info spawn args '/home/.../node_modules/node-gyp/gyp/gyp_main.py',
6014 error gyp info spawn args 'binding.gyp',
6014 error gyp info spawn args '-f',
6014 error gyp info spawn args 'make',
6014 error gyp info spawn args '-I',
6014 error gyp info spawn args '/home/.../node_modules/node-sass/build/config.gypi',
6014 error gyp info spawn args '-I',
6014 error gyp info spawn args '/home/.../node_modules/node-gyp/addon.gypi',
6014 error gyp info spawn args '-I',
6014 error gyp info spawn args '/home/.../.node-gyp/16.14.0/include/node/common.gypi',
6014 error gyp info spawn args '-Dlibrary=shared_library',
6014 error gyp info spawn args '-Dvisibility=default',
6014 error gyp info spawn args '-Dnode_root_dir=/home/.../.node-gyp/16.14.0',
6014 error gyp info spawn args '-Dnode_gyp_dir=/home/.../node_modules/node-gyp',
6014 error gyp info spawn args '-Dnode_lib_file=/home/.../.node-gyp/16.14.0/<(target_arch)/node.lib',
6014 error gyp info spawn args '-Dmodule_root_dir=/home/.../node_modules/node-sass',
6014 error gyp info spawn args '-Dnode_engine=v8',
6014 error gyp info spawn args '--depth=.',
6014 error gyp info spawn args '--no-parallel',
6014 error gyp info spawn args '--generator-output',
6014 error gyp info spawn args 'build',
6014 error gyp info spawn args '-Goutput_dir=.'
6014 error gyp info spawn args ]
6014 error gyp: Call to 'node -e "require('nan')"' returned exit status 0 while in binding.gyp. while trying to load binding.gyp
6014 error gyp ERR! configure error
6014 error gyp ERR! stack Error: `gyp` failed with exit code: 1
6014 error gyp ERR! stack at ChildProcess.onCpExit (/home/.../node_modules/node-gyp/lib/configure.js:345:16)
6014 error gyp ERR! stack at ChildProcess.emit (node:events:520:28)
6014 error gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
6014 error gyp ERR! System Linux 5.10.60.1-microsoft-standard-WSL2
6014 error gyp ERR! command "/home/.../.nvm/versions/node/v16.14.0/bin/node" "/home/.../node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
6014 error gyp ERR! cwd /home/.../node_modules/node-sass
6014 error gyp ERR! node -v v16.14.0
6014 error gyp ERR! node-gyp -v v3.8.0
6014 error gyp ERR! not ok
6014 error Build failed with error code: 1
Here are the dev dependencies in my package.json file in case that's helpful.
"devDependencies": {
"@babel/cli": "^7.12.8",
"@babel/core": "^7.12.9",
"@babel/preset-env": "^7.12.7",
"archiver": "^5.1.0",
"autoprefixer": "^10.0.2",
"axios": "^0.21.1",
"bootstrap": "^4.6.0",
"browser-sync": "^2.26.14",
"browser-sync-webpack-plugin": "^2.0.1",
"clean-css-cli": "^4.3.0",
"cross-env": "^7.0",
"csvjson": "^5.1.0",
"eslint": "^7.14.0",
"eslint-config-standard": "^16.0.2",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^5.0.0",
"express": "^4.17.1",
"express-handlebars": "^5.2.0",
"glob": "^7.1.6",
"handlebars": "^4.7.6",
"jquery": "^3.2",
"karma": "^5.2.3",
"karma-chrome-launcher": "^3.1.0",
"karma-qunit": "^4.1.1",
"karma-viewport": "^1.0.7",
"laravel-mix": "^5.0.1",
"lodash": "^4.17.19",
"node-sass": "^4.14.1",
"npm-run-all": "^4.1.5",
"pkg-dir": "^5.0.0",
"popper.js": "^1.12",
"postcss": "^8.1.10",
"postcss-cli": "^8.3.0",
"postcss-loader": "^3.0.0",
"pretty": "^2.0.0",
"qunit": "^2.12.0",
"relative": "^3.0.2",
"resolve": "^1.19.0",
"resolve-pkg": "^2.0.0",
"resolve-url-loader": "^3.1.0",
"rollup": "^2.33.3",
"rollup-plugin-babel": "^4.4.0",
"rtlcss": "^2.6.1",
"sass": "^1.32.0",
"sass-loader": "^8.0.0",
"uglify-js": "^3.12.0",
"vue-template-compiler": "^2.6.12",
"xtend": "^4.0.2"
}
}
I deleted my node_modules folder and ran npm install
and I get this:
npm ERR! /home/.../.node-gyp/16.14.0/include/node/v8-internal.h: In function ‘void v8::internal::PerformCastCheck(T*)’:
npm ERR! /home/.../.node-gyp/16.14.0/include/node/v8-internal.h:492:38: error: ‘remove_cv_t’ is not a member of ‘std’; did you mean ‘remove_cv’?
npm ERR! 492 | !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR! | ^~~~~~~~~~~
npm ERR! | remove_cv