I installed NodeJs LTS v6.9.5 for windows, and then did
npm -g install create-react-app
But it gave me a warning that I need node 4.0
When I run node --version, I got 0.12.2
And when I run :
create-react-app hello-world
I got the error:
"You are running Node 0.12.2
Create React App requires Node 4 or higher"
any idea how to make it work.
And why node version shows 0.12.2, when I installed NodeJs LTS v6.9.5
You have multiple versions of node installed on your machine thats why it is showing 0.12.2. Use n or nvm to change or switch node versions. (They are not supported on windows yet).
Related
I am trying to create a new React app with create-react-app. However, when I ran npx create-react-app my-app I got an error:
npx: installed 67 in 8.408s You are running Node 12.22.0.
No worries, I went to the node.js site and downloaded and installed the latest version (18.1.0) and tried again, but got the same error.
Running node -v says I'm still using 12.22.-0.
So I tried npm install -g node --force. Install went fine, but again running node -v still says I'm using 12.22.0 and create-react-app wont work.
I am on Mac OS.
What can I do?
Node isn't installed via npm.
You need to either install Node via the official Mac OS installer, or via Brew (Recommended if you need more than one version)
https://nodejs.org/en/download/ - Download the Mac OS installer that suits your OS Version.
i have run a react native with Expo application .
i used yarn package manger run the commands
yarn install
then expo start
there is an warning upper
WARNING: expo-cli has not yet been tested against Node.js v17.8.0.
If you encounter any issues, please report them to https://github.com/expo/expo-cli/issues
expo-cli supports following Node.js versions:
=12.13.0 <13.0.0 (Maintenance LTS)
=14.0.0 <15.0.0 (Active LTS)
=15.0.0 <17.0.0 (Current Release)
and expo go show this message there was problem loading the requset app
node.js version v16.14.2
Expo version 5.3.0
u are using current release version which is not yet tested with expo
use LTS version
first check you node version
go to cli then enter node -v
if it is not the required version then install the required version using the command
npm install -g node#version
the recommended version is 16.14.2 (LTS)
I am trying to upgrade my existing angular project from angular 8 to angular 13. and my current node version is 15.3.0.
so it was showing error to upgrade node version to >=16 then i upgraded node to 16.10 . now when I am running command to update #angular/cli its throwing error like node js version 15.3.0 detected,
Even while creating new app same error is coming.
I uninstalled the old node 15.3.0 and installed new version 16.10 but still its showing same error.
But when we run node -v its showing 16.10 ,same when we open node js command prompt.
Only for the project creation / update angular cli it shows version 15.3.0 detected.
is there any specific reason ?
Node js command prompt shows::
but while creating app shows error::
try closing the terminal and open it again as administrator. had the same issue and it worked for me well.
otherwise you could try installing node via nvm (Node Version Manager):
todo:
Install nvm Node Version Manager
run nvm install 16
check if version is installed with: nvm ls
switch default version to nvm alias default 16.10.0
check current version with: node -v
if its printing your desired version it should work well.
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
I am trying to install the environment for react native.
I followed the instruction of the site until the point to enter into the cmd
create-react-native-app AwesomeProject
after several moments I get a big green message:
You are currently running Node v0.12.2.
React Native runs on Node 4.0 or newer. There are several ways to
upgrade Node.js depending on your preference.
nvm: nvm install node && nvm alias default node
Homebrew: brew unlink iojs; brew install node
Installer: download the Mac .pkg from https://nodejs.org/
About Node.js: https://nodejs.org
Follow along at: https://github.com/facebook/react-native/issues/2545
I try to upgrade my nodejs but I have the newest version form the site.
why does it still throws me this error ?
Hi user24136 i build react native apps myself and i have latest Node version running. Error states your Node.js installed is old and React Native does run on Node 4.0+. Seems like your on a Mac, visit this link Node.js and use installer to upgrade your NPM and Node to latest versions. After successful installations run commands node -v and npm -v and you should see newer version v6.10.3 and 3.10.10 respectively. Then run command react-native init AwesomeProject and check if it works.
This problem interested in from your only node version
you can use sudo n stable command your terminal. This command increase your node version.