node.js - 错误! Buffer.alloc 不是函数

标签 node.js npm angular2-routing

我是 Angular 2 的新手。我想在我的 Windows 系统中安装 npm。但我收到以下错误:

npm ERR! Buffer.alloc is not a function

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\swayeole\AppData\Roaming\npm-cache\_logs\2017-09-07T10_04_
08_794Z-debug.log  
  • nmp 版本:5.4.0
  • Node 版本:4.4.7

最佳答案

在我的例子中,在 http://nodejs.org 安装 LTS 或最新版本的 node.js

安装后,NPM 版本可能是低版本,但它运行良好。

你可以更新到新版本的 NPM

关于node.js - 错误! Buffer.alloc 不是函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46093777/

相关文章:

node.js - npm 安装失败,错误代码为 "Cannot find module ' glob'"

javascript - 设置 React Native 和 Flow - 获取 Native Base 错误

angular - 三级路由

javascript - Angular2 中的 router.navigate 和 router.parent.navigate 有什么区别?

javascript - fetch() 为每次调用注入(inject)查询变量/ header 值

node.js - Node async.js : callback is not a function error?

npm - 通过使用 npm 安装在 webpack 中使用 particles.js

typescript - 为什么我的 angular2 应用程序初始化两次?

node.js - Firebase TypeError : ref. 事务不是函数

node.js - 使用服务器端渲染的 React 应用程序会因负载而崩溃