错误的ERR! cb不是一个功能

时间:2016-08-05 20:49:49

标签: php node.js laravel

我正在使用Laravel 5.3-dev,
我尝试安装Laravel Elixir,然后按照文档https://laravel.com/docs/master/elixir

进行操作

当我运行npm install --no-bin-links时,
有什么不对,
npm install是相同的结果 如下:

$ npm install --no-bin-links
npm WARN deprecated graceful-fs@3.0.8: graceful-fs v3.0.0 and before will fail o                                                                                                  n node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible                                                                                                  . Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher                                                                                                   to avoid a RegExp DoS issue
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher                                                                                                   to avoid a RegExp DoS issue
npm WARN deprecated lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade                                                                                                   to lodash@^4.0.0.
npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail o                                                                                                  n node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible                                                                                                  . Use 'npm ls graceful-fs' to find it in the tree.
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\dell\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js                                                   " "install" "--no-bin-links"
npm ERR! node v7.0.0-nightly2016080329e49fc286
npm ERR! npm  v3.10.5

npm ERR! cb is not a function
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\dell\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js                                                   " "install" "--no-bin-links"
npm ERR! node v7.0.0-nightly2016080329e49fc286
npm ERR! npm  v3.10.5


npm ERR! cb is not a function
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!     D:\wnmp\www\laravel-5-3-demo\npm-debug.log

我该怎么办?

1 个答案:

答案 0 :(得分:0)

根据错误消息,您每晚都在使用Node v7。这有(或有?)中断的变化,包括某些同步函数提供v6中不需要的回调的要求。 “cb不是函数”的错误肯定听起来像是那个问题。

使用Node.js的当前版本或LTS版本。在撰写本文时,Node.js的当前版本是6.3.1。 LTS版本是4.4.7。

除非您有充分的理由,否则请勿使用夜间版本,例如尝试测试特定内容。如果您使用夜间版本,请准备好遇到问题,您需要深入了解并进行调查。