node.js - Node 8.0 安装,但 npm 停留在旧版本

标签 node.js npm windows-10 updates

在 Windows 10 上安装了 Node 版本 v8。它说它随 npm 5 一起提供...... 但卡在3.5.3

λ npm i -g npm
npm ERR! Windows_NT 10.0.14393

npm ERR! argv "npm" "i" "-g" "npm"

npm ERR! node v8.0.0

**npm ERR! npm  v3.5.3**

**npm ERR! code MODULE_NOT_FOUND**

**npm ERR! Cannot find module 'internal/fs'**
npm ERR!

npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>


npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\user\npm-debug.log

我做了什么:

  • 卸载 Node 并重新安装
  • 安装不同版本的 Node (7.7.0) 并查看它是否更新了 npm
  • 使用了 npm clean cache -f

这些东西都不起作用...... 那么有什么想法吗?

最佳答案

我遇到了同样的问题,必须运行

npm install npm@latest -g

从命令行。我被告知 Node 和 npm 版本会有所不同。

关于node.js - Node 8.0 安装,但 npm 停留在旧版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44358596/

相关文章:

node.js - App Engine 上的 React.js 作为服务查询作为同一项目上的另一个服务运行的 API

node.js - 在 Meteor 中延迟加载有什么用?

node.js - 无法弄清楚如何在 Bot Service 上生成和查看 Node Js bot 的日志

javascript - 警告 : flatten is not a function Use --force to continue

javascript - create-react-app 中止,代码为 ENOENT

c# - 我如何在 UWP 中的 OnLaunchApplicationAsync for Prism 中实现耗时任务?

google-chrome - 如何调试自签名证书?

javascript - 导入直接从github安装的npm模块

c# - 激活 Windows 应用商店应用程序...失败,错误为 'The app didn' t start'

gruntjs - grunt 失败, "cannot find module ' tmp'"