【发布时间】:2020-10-26 15:42:15
【问题描述】:
环境:
1 - Windows 10
2 - 节点
3 - 节点:v14.8.0
4 - npm:6.9.0
尝试全局安装 npx 或使用 npm 创建 react 应用。
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
我已经多次尝试以下解决方案,即使 Windows 重新启动也没有用。
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)
我想补充的另一件事是我没有运行管理员用户。所以重新安装并不容易。
【问题讨论】: