Inz*_*san 3 node.js npm nodist npx
环境:
\n1 - Windows 10
\n2 - 节点主义者
\n3 - 节点:v14.8.0
\n4 - npm:6.9.0
\n尝试全局安装 npx 或使用 npm 创建 React 应用程序。
\nnpm install -g npx\nnpm WARN npm npm does not support Node.js v14.8.0\nnpm WARN npm You should probably upgrade to a newer version of node as we\nnpm WARN npm can't make any promises that npm will work with this version.\nnpm WARN npm Supported releases of Node.js are the latest release of 6, 8, 9, 10, 11, 12.\nnpm WARN npm You can find the latest version at https://nodejs.org/\nnpm ERR! cb.apply is not a function\n\nnpm init react-app my-app\nnpm WARN npm npm does not support Node.js v14.8.0\nnpm WARN npm You should probably upgrade to a newer version of node as we\nnpm WARN npm can't make any promises that npm will work with this version.\nnpm WARN npm Supported releases of Node.js are the latest release of 6, 8, 9, 10, 11, 12.\nnpm WARN npm You can find the latest version at https://nodejs.org/\nnpm ERR! cb.apply is not a function\nRun Code Online (Sandbox Code Playgroud)\n我已经多次尝试以下解决方案,即使 Windows 重新启动也没有用。
\n1. Go to C:\\Users(your username)\\AppData\\Roaming\n2. Delete the npm folder (possibly back it up) and if there is one npm cache folder.\n3. Run npm clean cache \xe2\x80\x94force ( \xe2\x80\x94 force is now required to clean cache)\nRun Code Online (Sandbox Code Playgroud)\n我想补充的一件事是我没有运行管理员用户。所以重新安装并不容易。
\nnpm WARN npm 支持的 Node.js 版本是最新版本 6、8、9、10、11、12。
这意味着您正在运行旧版本,npm而不是 Node.js 二进制文件附带的版本。
造成这种情况的原因有多种。一种可能性是在您的计算机上存在多个 Node.js 实例时该值不好PATH。
阻力最小的路径可能是首先升级,在这个过程中npm很可能会升级。npx要做到这一点:
npm install -g npm
| 归档时间: |
|
| 查看次数: |
8492 次 |
| 最近记录: |