How to fix 'npm does not support Node.js v11.14.0 error' on Windows?
Solution 1
Simple solution is upgrade your npm version or second option is downgrade your node version.
Download older node version from here
https://nodejs.org/en/download/releases/
How do I update npm?
npm install -g npm
Please note that this command will remove your current version of npm. Make sure to use sudo npm install -g npm if on a Mac.
You can also update all outdated local packages by doing npm update without any arguments, or global packages by doing npm update -g.
Occasionally, the version of npm will progress such that the current version cannot be properly installed with the version that you have installed already. (Consider, if there is ever a bug in the update command.) In those cases, you can do this
Solution 2
After installing current NodeJS LTS, I still get
npm does not support Node.js {version}
.
I deleted all files in C:\Users\{user}\AppData\Roaming\npm\
and it works.
Solution 3
npm install -g npm-windows-upgrade
npm-windows-upgrade
Solution 4
I deleted node and npm from C:\Users{name}\AppData\Roaming. Then i reinstalled an older version node.js v10.15.3 and npm 6.4.1.
This brings up a different error so I'll be closing this issue...
C:\>npm install -g expo-cli
npm ERR! Cannot read property 'startsWith' of null
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\dnort\AppData\Roaming\npm-cache\_logs\2019-04-15T06_32_09_154Z-
debug.log
Dominic Norton
Updated on June 04, 2022Comments
-
Dominic Norton almost 2 years
I am configuring my react-native environment. I am attempting to run the react-native command line as described in Facebook's Github documentation here
I have installed the latest version of node.js when I type
C:\WINDOWS\system32>node -v
v11.14.
is returned.The npm downloaded was included with the latest version of node.js. However it is only 5.5.1. When I input
C:\WINDOWS\system32>npm -v
the result is5.5.1
- I've tried to uninstall and reinstall
- I've tried to download the LTS version of node.js
- I've tried to upgrade both node.js and npm
- This is for Windows 10
- This is running from the administrative command prompt and administrative power shell
This is the code
C:\WINDOWS\system32>npm install -g react-native-cli npm WARN npm npm does not support Node.js v10.15.3 npm WARN npm You should probably upgrade to a newer version of node as we npm WARN npm can't make any promises that npm will work with this version. npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8. npm WARN npm You can find the latest version at https://nodejs.org/ npm ERR! Cannot read property 'startsWith' of null npm ERR! A complete log of this run can be found in:
When I attempt to clean the cache with
npm cache clean -f
this is the resultC:\WINDOWS\system32>npm cache clean -f npm WARN npm npm does not support Node.js v10.15.3 npm WARN npm You should probably upgrade to a newer version of node as we npm WARN npm can't make any promises that npm will work with this version. npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8. npm WARN npm You can find the latest version at https://nodejs.org/ npm WARN using --force I sure hope you know what you are doing.
Edits The following code is a result of some of the proposed solutions
C:\WINDOWS\system32>npm install -g npm npm WARN npm npm does not support Node.js v11.14.0 npm WARN npm You should probably upgrade to a newer version of node as we npm WARN npm can't make any promises that npm will work with this version. npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8. npm WARN npm You can find the latest version at https://nodejs.org/ npm ERR! Cannot read property 'startsWith' of null npm ERR! A complete log of this run can be found in:
C:\WINDOWS\system32>npm install -g npm-windows-upgrade npm WARN npm npm does not support Node.js v11.14.0 npm WARN npm You should probably upgrade to a newer version of node as we npm WARN npm can't make any promises that npm will work with this version. npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8. npm WARN npm You can find the latest version at https://nodejs.org/ npm ERR! Cannot read property 'startsWith' of null npm ERR! A complete log of this run can be found in:
C:\WINDOWS\system32>npm install -g npm-windows-upgrade npm WARN npm npm does not support Node.js v11.14.0 npm WARN npm You should probably upgrade to a newer version of node as we npm WARN npm can't make any promises that npm will work with this version. npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8. npm WARN npm You can find the latest version at https://nodejs.org/ npm ERR! Cannot read property 'startsWith' of null npm ERR! A complete log of this run can be found in:
I expect to open the npm command line interface. I am receiving errors when I attempt to call the interface.