I am on Ubuntu 22.04 and trying to install angular/cli globally. I am getting this warning:
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'pacote#15.0.6',
npm WARN EBADENGINE required: { node: '^14.17.0 || ^16.13.0 || >=18.0.0' },
npm WARN EBADENGINE current: { node: 'v12.22.9', npm: '8.10.0' }
npm WARN EBADENGINE }
I found multiple questions on stackoverflow regarding this problem. The answers all point at using a stable version of node. I have node version 18.12.1 which currently is the latest stable version and npm version 8.19.2 that comes with it.
Now I know that people will be asking in the comments if I have node version 18.12.1 installed, so here it is:
jan#ubuntu-22-04:~$ node -v
v18.12.1
jan#ubuntu-22-04:~$ npm -v
8.19.2
jan#ubuntu-22-04:~$
But then the warning seems to suggest that I have node version 12.22.9 and npm version 8.10.0.
npm WARN EBADENGINE current: { node: 'v12.22.9', npm: '8.10.0' }
So what is going on??? Is my understanding of the warning incorrect? Is there a Ubuntu-problem that I don´t understand? Can anybody please help me out?
EDIT:
It looks like I have two different versions of node. Look at this:
jan#ubuntu-22-04:~$ node -v
v18.12.1
jan#ubuntu-22-04:~$ sudo node -v
v12.22.9
Using sudo gives me version 12.22.9 as the warning states. I still don´t know how to solve it. Can anybody help?
Related
How do I determine, in advance what version of node are required for a particular package? I'm getting several warnings like this below that I'm interpreting to be an incompatibility with the version of npm I'm using.
Is there a way I can go https://www.npmjs.com/package/#angular-devkit/architect/v/0.1500.0?activeTab=dependencies or similar and see what versions of node are required?
Also, why in the world would any package require such a specific set of versions as listed below?
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '#angular-devkit/architect#0.1200.3',
npm WARN EBADENGINE required: {
npm WARN EBADENGINE node: '^12.14.1 || >=14.0.0',
npm WARN EBADENGINE npm: '^6.11.0 || ^7.5.6',
npm WARN EBADENGINE yarn: '>= 1.13.0'
npm WARN EBADENGINE },
npm WARN EBADENGINE current: { node: 'v16.18.1', npm: '8.19.2' }
npm WARN EBADENGINE }
After a clean Gatsby 5.2 install using the Gatsby CLI, I need help understanding my terminal output, which shows a multitude of NPM WARN flags.
I have three questions;
What is the cause of these errors?
Why are these errors happening with a clean install?
What is the preferred method for resolving issues like these?
I'm asking these questions here on S.O. because I'd like to pre-emptively learn how to understand and deal with them correctly.
I read up on some similar questions here on S.O., and some recommend using the --legacy-peer-deps flag.
I understand why someone might use the --legacy-peer-deps flag in general, but I'm struggling to understand why a new release, I.e. (Gatsby 5.0), needs to use the --legacy-peer-deps.
NPM errors are still a pain point for me, so I'm looking for easy-to-understand reading material. Or a well-rounded explanation if possible.
After running: gatsby info --clipboard
% gatsby info --clipboard
System:
OS: macOS 13.0.1
CPU: (16) x64 Intel(R) Xeon(R) W-2140B CPU # 3.20GHz
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.12.1 - ~/.nvm/versions/node/v18.12.1/bin/node
npm: 8.19.2 - ~/.nvm/versions/node/v18.12.1/bin/npm
Browsers:
Chrome: 108.0.5359.98
Safari: 16.1
npmPackages:
gatsby: ^5.2.0 => 5.2.0
gatsby-plugin-image: ^3.2.0 => 3.2.0
gatsby-plugin-manifest: ^5.2.0 => 5.2.0
gatsby-plugin-sharp: ^5.2.0 => 5.2.0
gatsby-source-filesystem: ^5.2.0 => 5.2.0
gatsby-transformer-sharp: ^5.2.0 => 5.2.0
npmGlobalPackages:
gatsby-cli: 5.2.0
%
The expected result after running: npm i
% npm i
removed 1505 packages, and audited 83 packages in 8s
20 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
%
Actual result after running: npm i
% npm i
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-server-dom-webpack#0.0.0-experimental-c8b778b7f-20220825
npm WARN Found: react#18.2.0
npm WARN node_modules/react
npm WARN react#"^18.2.0" from the root project
npm WARN 10 more (react-dom, gatsby, gatsby-plugin-image, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react#"0.0.0-experimental-c8b778b7f-20220825" from react-server-dom-webpack#0.0.0-experimental-c8b778b7f-20220825
npm WARN node_modules/react-server-dom-webpack
npm WARN react-server-dom-webpack#"0.0.0-experimental-c8b778b7f-20220825" from gatsby#5.2.0
npm WARN node_modules/gatsby
npm WARN
npm WARN Conflicting peer dependency: react#0.0.0-experimental-c8b778b7f-20220825
npm WARN node_modules/react
npm WARN peer react#"0.0.0-experimental-c8b778b7f-20220825" from react-server-dom-webpack#0.0.0-experimental-c8b778b7f-20220825
npm WARN node_modules/react-server-dom-webpack
npm WARN react-server-dom-webpack#"0.0.0-experimental-c8b778b7f-20220825" from gatsby#5.2.0
npm WARN node_modules/gatsby
npm WARN deprecated async-cache#1.1.0: No longer maintained. Use [lru-cache](http://npm.im/lru-cache) version 7.6 or higher, and provide an asynchronous `fetchMethod` option.
npm WARN deprecated stable#0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm WARN deprecated babel-eslint#10.1.0: babel-eslint is now #babel/eslint-parser. This package will no longer receive updates.
added 1505 packages, and audited 1588 packages in 1m
325 packages are looking for funding
run `npm fund` for details
15 moderate severity vulnerabilities
To address issues that do not require attention, run:
npm audit fix
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
%
So after some time digging around online, I ended up piecing my answer together and in summary;
I learned that Gatsby explicitly asked for an experimental build of react-server-dom-webpack. After looking at the package.json file located within node_modules/react-server-dom-webpack.
After checking the official repo online for react-server-dom-webpack, I noticed that the package.json file is currently configured differently. (See the official package.json file)
I still couldn't understand why Gatsby explicitly asked for an experimental build of react-server-dom-webpack. So I folded and decided to raise an issue in the official Gatsby Repo. (Link to Issue).
The Answer
For Partial Hydration, Gatsby currently has to use an experimental version of react-server-dom-webpack that sets an experimental version of React as a peerDep.
Until Gatsby has fixed this and you want to remove this warning you can add this to your package.json to tell npm which dependency version to use:
"overrides": {
"react-server-dom-webpack#0.0.0-experimental-c8b778b7f-20220825": {
"react": "^18.2.0"
}
}
Link to comment in github where I found this fix.
Newbie here, I am trying to install vue cli for frontend development with npm, but it is throwing an error.
Here is the output of sudo npm install -g #vue/cli
[18:00 vue]$ sudo npm install -g #vue/cli
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated #hapi/joi#15.1.1: Switch to 'npm install joi'
npm WARN deprecated #hapi/topo#3.1.6: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/hoek#8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/address#2.1.4: Moved to 'npm install #sideway/address'
npm WARN deprecated #hapi/bourne#1.3.2: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! <https://npm.community>
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-01-18T13_06_37_662Z-debug.log
Here is a complete log
I tried with and without sudo, the same error.
My machine runs Manjaro KDE 20.2, npm version 6.14.9, node v15.4.0. I have tried:
retrying to see if it works this time
sudo npm cache verify and sudo npm cache clean --force
removing /usr/lib/node_modules
reinstalling node and npm
anything else i found on the internet
I'm stuck on this error for a few days, any help is appreciated.
It's interesting that it works without -g flag, installing to current folder, but I can't figure out how to use vue command then.
Okay, i removed that Manjaro, and grabbed the latest version of ubuntu, this solved my problem, will never install Manjaro again.
I am trying to install angular 5 in my pc. Everything installed correctly,but when I use 'ng-serve' command to run my application it shows following error.
You are running version v8.7.0 of Node.js, which is not supported by Angular CLI v6.
The official Node.js version that is supported is 8.9 and greater.
Please visit https://nodejs.org/en/ to find instructions on how to update Node.js.
current version of node.js is '8.7.0' and npm is '6.0.0'.
After a lot of search I followed below steps to update my node.js on windows 10
npm cache clean -f
npm install -g n
n latest
but I failed to use this commands,it shows following error
C:\WINDOWS\system32>npm cache clean -f
npm WARN using --force I sure hope you know what you are doing.
C:\WINDOWS\system32>npm install -g n
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for n#2.1.8: wanted {"os":"!win32","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! notsup Valid OS: !win32
npm ERR! notsup Valid Arch: any
npm ERR! notsup Actual OS: win32
npm ERR! notsup Actual Arch: x64
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\HP\AppData\Roaming\npm-cache\_logs\2018-05-06T07_36_10_847Z-debug.log
how can I update node.js to latest version inorder to run my angular5 application?
Problem here is you are already having node version of 8.7.0 installed in your machine.You have to remove that first.
Steps to solve this issue.
1.Check path of nodejs in environment variables
2.Go to that path and delete the entire folder(old node js)
3.Delete that path in environmental variables
4.Go to some path and type npm in cmd.you should get command not recognized.
4.Now go to the desired path and run npm install command.your new version of node js will be updated.
Hope I helped
Reinstalling ng-cli and removing npm & npm-cache from C:\Users***\AppData\Roaming fixed this issue;
More details can be found here:
https://stackoverflow.com/a/62184572/6792588
You have the message indicating that the installed node version does not support Angular.
What you need to do is update your node.
The commands you are using, are not for updating on WINDOWS, are commands to use on Linux and MacOs
You should use this command:
npm install npm#latest -g
You can download Windows Installer and set up as new install https://nodejs.org/en/download/
Hi I am trying to install gulp and its not working and just returns this message.
$ npm install gulp --save-dev
npm WARN deprecated minimatch#2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch#0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs#1.2.3: graceful-fs v3.0.0 and before will fail o n node releases >= v7.0. Please update to graceful-fs#^4.0.0 as soon as possible . Use 'npm ls graceful-fs' to find it in the tree.
npm WARN abc#1.0.0 No description
npm WARN abc#1.0.0 No repository field.
These are just Warnings that can be ignored. To check if the module was properly installed, Try the following command to check the version installed:
npm list | grep gulp
It will list the version that previous command installed. If you don't get any version, then check version of npm are you using. Kindly update the version of npm and try again. It looks like that your npm version is outdated.
npm install -g npm