webpacker
webpacker copied to clipboard
Cannot install on Node version 16
Describe the bug Webpacker can't be installed on Node 16
To Reproduce Steps to reproduce the behavior:
- Install node 16
- Run command
npm install webpacker
- See error
Expected behavior Webpacker is installed
Screenshots
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: webapp-webpack-plugin has been merged back to favicons-webpack-plugin, use it instead.
npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated [email protected]: 3.x is no longer supported
npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated @babel/[email protected]: 🚨 This package has been deprecated in favor of separate inclusion of a polyfill and regenerator-runtime (when needed). See the @babel/polyfill docs (https://babeljs.io/docs/en/babel-polyfill) for more information.
npm WARN deprecated [email protected]: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! code 1
npm ERR! path /tmp/tmp.56MhkFoVgZ/node_modules/sharp
npm ERR! command failed
npm ERR! command sh -c (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
npm ERR! make: Entering directory '/tmp/tmp.56MhkFoVgZ/node_modules/sharp/build'
npm ERR! TOUCH Release/obj.target/libvips-cpp.stamp
npm ERR! CXX(target) Release/obj.target/sharp/src/common.o
npm ERR! make: Leaving directory '/tmp/tmp.56MhkFoVgZ/node_modules/sharp/build'
npm ERR! info sharp Using cached .npm/_libvips/libvips-8.7.4-linux-x64.tar.gz
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | x64
npm ERR! (node:10315) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! gyp info spawn /nix/store/y26dfhy5iz8va1h2dqrmnmw63a4lqs1r-python-2.7.18/bin/python2
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/tmp/tmp.56MhkFoVgZ/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/tmp/tmp.56MhkFoVgZ/node_modules/sharp/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/tmp/tmp.56MhkFoVgZ/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '.node-gyp/16.0.0/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=.node-gyp/16.0.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/tmp/tmp.56MhkFoVgZ/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=.node-gyp/16.0.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/tmp/tmp.56MhkFoVgZ/node_modules/sharp',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! <command-line>: warning: "_GLIBCXX_USE_CXX11_ABI" redefined
npm ERR! <command-line>: note: this is the location of the previous definition
npm ERR! In file included from .node-gyp/16.0.0/include/node/v8.h:30,
npm ERR! from .node-gyp/16.0.0/include/node/node.h:63,
npm ERR! from ../src/common.cc:22:
npm ERR! .node-gyp/16.0.0/include/node/v8-internal.h: In function ‘void v8::internal::PerformCastCheck(T*)’:
npm ERR! .node-gyp/16.0.0/include/node/v8-internal.h:452:38: error: ‘remove_cv_t’ is not a member of ‘std’; did you mean ‘remove_cv’?
npm ERR! 452 | !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR! | ^~~~~~~~~~~
npm ERR! | remove_cv
npm ERR! .node-gyp/16.0.0/include/node/v8-internal.h:452:38: error: ‘remove_cv_t’ is not a member of ‘std’; did you mean ‘remove_cv’?
npm ERR! 452 | !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR! | ^~~~~~~~~~~
npm ERR! | remove_cv
npm ERR! .node-gyp/16.0.0/include/node/v8-internal.h:452:50: error: template argument 2 is invalid
npm ERR! 452 | !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR! | ^
npm ERR! .node-gyp/16.0.0/include/node/v8-internal.h:452:63: error: ‘::Perform’ has not been declared
npm ERR! 452 | !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR! | ^~~~~~~
npm ERR! make: *** [sharp.target.mk:136: Release/obj.target/sharp/src/common.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.onExit (/tmp/tmp.56MhkFoVgZ/node_modules/node-gyp/lib/build.js:262:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:365:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Linux 5.4.112
npm ERR! gyp ERR! command "/nix/store/10wr8hhj0yln8laf3xnk5kabjcswpj31-nodejs-16.0.0/bin/node" "/tmp/tmp.56MhkFoVgZ/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /tmp/tmp.56MhkFoVgZ/node_modules/sharp
npm ERR! gyp ERR! node -v v16.0.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
Environment:
- OS: NixOS 20.09pre-git (Nightingale)
- Webpacker version: 4.6.0
- Node version: 16.0.0
- Npm version: 7.10.0
https://stackoverflow.com/questions/67241196/error-no-template-named-remove-cv-t-in-namespace-std-did-you-mean-remove