Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix 'npm does not support Node.js v11.14.0 error' on Windows?

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 is 5.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 result

C:\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.

like image 778
Dominic Norton Avatar asked Oct 24 '25 02:10

Dominic Norton


1 Answers

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.

like image 110
VV5198722 Avatar answered Oct 26 '25 18:10

VV5198722