我在安裝grunt-cli後遇到問題。我跑嘗試運行grunt時找不到模塊'findup-sync'
npm install -g grunt-cli
然後運行咕嚕錯誤與
node.js:63
throw e;
^
Error: Cannot find module 'findup-sync'
at loadModule (node.js:275:15)
at require (node.js:411:14)
at Object.<anonymous> (/home/tmartin/bin/grunt:9:14)
at Module._compile (node.js:462:23)
at Module._loadScriptSync (node.js:469:10)
at Module.loadSync (node.js:338:12)
at Object.runMain (node.js:522:24)
at Array.<anonymous> (node.js:756:12)
at EventEmitter._tickCallback (node.js:55:22)
at node.js:773:9
這是我已經安裝:
[email protected]:~$ npm list -g
/home/tmartin/lib
└─┬ [email protected]
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ └─┬ [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ └── [email protected]
└─┬ [email protected]
└── [email protected]
我有這個問題,因爲我安裝了這個'npm install -g grunt grunt-cli'的grunt-cli和grunt。 grunt-cli需要在grunt之前安裝,所以它應該是'npm install -g grunt-cli grunt' – davidcondrey 2015-06-03 18:13:46
我有一個非常類似的錯誤,並且切換npm install的順序也爲我做了。 – 2015-11-02 18:03:07