我收到此错误,无法找到任何解决方法。它在尝试执行时发生broccoli build
。
Error: Cannot find module 'broccoli' from '/Users/devel/Projects/broccoliTest'
at Function.module.exports [as sync] (/usr/local/lib/node_modules/broccoli-cli/node_modules/resolve/lib/sync.js:32:11)
at Object.<anonymous> (/usr/local/lib/node_modules/broccoli-cli/bin/broccoli:7:28)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:906:3
我刚刚安装了sudo npm install -g broccoli
和sudo npm install -g broccoli-cli
. broccoli
可执行文件很好,obv :
>which broccoli
/usr/local/bin/broccoli
所以看起来是没有正确安装broccoli模块,虽然安装过程中没有出现错误。
ls /usr/local/lib/node_modules/broccoli
CHANGELOG.md LICENSE README.md docs lib node_modules package.json templates
有任何想法吗?