Reputation: 215
Environment:
1 - Windows 10
2 - Nodist
3 - Node : v14.8.0
4 - npm: 6.9.0
Trying to install npx globally or create react app using npm.
npm install -g npx
npm WARN npm npm does not support Node.js v14.8.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 6, 8, 9, 10, 11, 12.
npm WARN npm You can find the latest version at https://nodejs.org/
npm ERR! cb.apply is not a function
npm init react-app my-app
npm WARN npm npm does not support Node.js v14.8.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 6, 8, 9, 10, 11, 12.
npm WARN npm You can find the latest version at https://nodejs.org/
npm ERR! cb.apply is not a function
I have tried following solution multiple times even windows restarts to no use.
1. Go to C:\Users(your username)\AppData\Roaming
2. Delete the npm folder (possibly back it up) and if there is one npm cache folder.
3. Run npm clean cache —force ( — force is now required to clean cache)
One more thing I want to add is that I am not running a admin user. So reinstallations are not easy.
Upvotes: 3
Views: 8717
Reputation: 70153
npm WARN npm Supported releases of Node.js are the latest release of 6, 8, 9, 10, 11, 12.
That means you are running an old version of npm
that is not the version that shipped with your Node.js binary.
There are several reasons this might be the case. One likelihood is a bad PATH
value given multiple Node.js instances on your computer.
Path of least resistance may be to upgrade npm
first, which will likely upgrade npx
in the process. To do that:
npm install -g npm
Upvotes: 6