Reputation: 390
I am trying to npm install
the packages of bpmn.io's form-js and it is stated in the docs that the requirements are node 16 and npm 8. So I used nvm to change my node and npm version to the ones required. Now I use node -v
and npm -v
and their results are:
v16.20.2
8.19.4
But after running npm install
, it seems like it still assumes my node is 12:
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '[email protected]',
npm WARN EBADENGINE required: { node: '>=16 || 14 >=14.17' },
npm WARN EBADENGINE current: { node: 'v12.22.9', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '[email protected]',
npm WARN EBADENGINE required: { node: '>= 16' },
npm WARN EBADENGINE current: { node: 'v12.22.9', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '[email protected]',
npm WARN EBADENGINE required: { node: '>=14' },
npm WARN EBADENGINE current: { node: 'v12.22.9', npm: '8.19.4' }
npm WARN EBADENGINE }
I have tried cleaning the cache after version switch:
npm cache clean --force
rm -rf node_modules
rm package-lock.json
I also tried ensuring the PATH environment variable is correctly set to use the nvm-installed version of Node:
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" bash_completion
But still, even after reboot, it seems like there's something wrong. Here's the rest of the errors in case someone recognizes what is wrong:
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '[email protected]',
npm WARN EBADENGINE required: { node: '>=14' },
npm WARN EBADENGINE current: { node: 'v12.22.9', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm WARN deprecated [email protected]: This package is no longer supported. Please use @npmcli/package-json instead.
npm WARN deprecated [email protected]: This package is no longer supported. Please use @npmcli/package-json instead.
npm WARN deprecated [email protected]: This package is no longer supported.
npm WARN deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm WARN deprecated [email protected]: This package is no longer supported.
npm WARN deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm WARN deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm WARN deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm WARN deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm WARN deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm WARN deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm WARN deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm WARN deprecated [email protected]: This package is no longer supported.
npm ERR! code 1
npm ERR! path /home/okaeiz/Camunda/form-js/node_modules/nx
npm ERR! command failed
npm ERR! command sh -c -- node ./bin/post-install
npm ERR! /home/okaeiz/Camunda/form-js/node_modules/nx/src/project-graph/project-graph.js:119
npm ERR! ...(projectConfigurationsError?.errors ?? []),
npm ERR! ^
npm ERR!
npm ERR! SyntaxError: Unexpected token '.'
npm ERR! at wrapSafe (internal/modules/cjs/loader.js:915:16)
npm ERR! at Module._compile (internal/modules/cjs/loader.js:963:27)
npm ERR! at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
npm ERR! at Module.load (internal/modules/cjs/loader.js:863:32)
npm ERR! at Function.Module._load (internal/modules/cjs/loader.js:708:14)
npm ERR! at Module.require (internal/modules/cjs/loader.js:887:19)
npm ERR! at require (internal/modules/cjs/helpers.js:74:18)
npm ERR! at Object.<anonymous> (/home/okaeiz/Camunda/form-js/node_modules/nx/bin/post-install.js:3:25)
npm ERR! at Module._compile (internal/modules/cjs/loader.js:999:30)
npm ERR! at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2024-06-06T08_08_02_495Z-debug-0.log
Upvotes: 0
Views: 6388
Reputation: 390
After countless hours of hairpulling effort, I found out that this is a connection problem. I tried to run npm install
while connected to a proxy and the packages were installed successfully.
Regarding the deprecation warnings and the Node and npm incompatibility, I realized those were irrelevant errors and you can safely ignore them.
Upvotes: 1