what's the comand to know the Node.js version in angular's eyes(opinion)? - node.js

when I do mvn compiling for flink source code,I get:
Node.js version v9.0.3 detected.
The Angular CLI requires a minimum Node.js version of eithor v10.13 or v12.0
when I input node -v, the result is 12.18
so,what's the comand to know the Node.js version in angular's eyes?
and where does the old version v9.0.3 come from?
I restart my computer and the error remains.
Thanks for your help.
(Python3.6) appleyuchi#Desktop:~$ which npm
/home/appleyuchi/.nvm/versions/node/v12.18.0/bin/npm
(Python3.6) appleyuchi#Desktop:~$ which nodejs
(Python3.6) appleyuchi#Desktop:~$ which node
/home/appleyuchi/.nvm/versions/node/v12.18.0/bin/node
I compile and get the following message again
Node.js version v10.9.0 detected.

what do you mean by angular's eyes? There is no different node for angular. if it is installed then the node is same for all framework.
Follow this link to check Angular, Node.js and TypeScript compatibility.
https://gist.github.com/LayZeeDK/c822cc812f75bb07b7c55d07ba2719b3
You can use nvm if you want to work with multiple node versions
this link will help in using nvm
https://www.sitepoint.com/quick-tip-multiple-versions-node-nvm/

Related

When you start Electron, you get an error that the version of Node.js is not supported

When you start Electron, you get an error that the version of Node.js is not supported.
The operating system is Windows.
When I update Node.js and do node -v, it shows v16.17.1.
When I start it with npm run electron:serve, the following error appears again.
What could be the cause?
The following modules are used to start Electron.
"vue-cli-plugin-electron-builder".
You are running Node.js 12.14.1.
Playwright requires Node.js 14 or higher.
Please update your version of Node.js.

I'm unable to run ng serve command in the terminal

PS C:\Users\naveen.chennagalla.vscode\AsPage6> ng serve
Node.js version v10.15.3 detected.
The Angular CLI requires a minimum Node.js version of either v12.20, v14.15, or v16.10.
Please update your Node.js version or visit https://nodejs.org/ for additional instructions.
PS C:\Users\naveen.chennagalla.vscode\AsPage6>
Compatibility list for Angular/Angular-CLI and Node.js might help you.

NG command is displaying incorrect node version

I am getting below error when I tried to use ng command
Node.js version v11.13.0 detected.
The Angular CLI requires a minimum Node.js version of either v10.13 or v12.0.
Please update your Node.js version or visit https://nodejs.org/ for additional instructions.
When I try to see the node version using node -v, I see node version on my machine is v12.18.3
So from where ng is getting v11.13.0? How do I resolve this issue?
I tried below steps
Clear the NPM cache
Uninstall both node versions from the NVM
Uninstall anything that starts with node in Control Panel\Programs and Features
Install required node versions in NVM
Install Angular CLI
and things started working for me.
Had the same issue. It turns out installed Angular CLI was not compatible with the installed node and npm version. I used the https://stackoverflow.com/a/60258560 to check the compatibility. Then performed following steps:
Uninstall Angular cli
Uninstall Node and NVM
Installed Node version I wanted (10.x).
Installed specific Angular version corresponding to Node v10 which was Angular Cli v11 at this time.
I was also facing the same issue in my Windows machine where the node -v version and the version picked up by ng command were different. This was because my node.js command prompt was picking the version from AppData\Roaming\npm folder. Cleaning up this folder fixed the issue for me.
Uninstall node
Empty the contents from C:\Users<user>\AppData\Roaming\npm
Install the required node version

Angular Node Problems

Trying to learn angular recently, but I am stuck in an error of angular. So here it is.
I am using Ubuntu 18.04, installed node latest version via nvm.
But I have "two" nodes in Ubuntu,[default] nodejs which is v8 now, and the node v13.
When I try to create angular project with ng new my-first-project it runs good, but it keeps warning of some deprecated dependencies for example core-js. I upgraded core-js to the latest(forced using sudo). But the deprecation warning did not disappear, I thought to use sudo ng new my-first-project but this time it brings me error
You are running version v8.10.0 of Node.js, which is not supported by Angular CLI 8.0+.
The official Node.js version that is supported is 10.9 or greater.
Please visit https://nodejs.org/en/ to find instructions on how to update Node.js.
How can I change angular's using nodejs -> node?
You have two Node.js versions installed with nvm, v8 and v13. It seems that Node.js v8 is active, you can check this with node --version command line command. If the version is really v8 you have to change it with nvm to v13 using nvm use 13.{x.x} command. The {x.x} should be the concrete installed version. If you don't know the installed versions by heart you can check them with nvm list command line command.
If you change the active Node.js version to v13 with nvm it will be used by Angular CLI and you won't get the above mentioned error.

Can't create new Angular project

Installed the Angular CLI using this command
npm install -g #angular/cli
But when creating new project using command
ng new PROJECT-NAME
it shows
You are running version v8.0.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.
But actually i am using nodejs v9.11.1
See screenshot of my cli
Mostly sounds like a version problem. The new angular cli version requires the latest version of node.
All you need to do is update node and npm to latest version , everything should work fine.
If you are working on windows I'd suggest just going on their site and getting the latest one(currently at the time of this post is 8.11.2). For linux based and mac I would suggest looking for a guide how to get latest version since installing from terminal with something like (apt-get install or yum) will not have latest version you need (can easily be changed with some simple commands)
Also do check the version of node with: node -v
There has also been a naming conflict on linux regarding node vs nodejs see this question.

Resources