2015-05-03 31 views
2

build steps,當我運行npm install,我結束了這個錯誤:Angular2構建過程(NPM安裝)未對 '一飲而盡pubget.dart'

module.js:340 
    throw err; 
     ^
Error: Cannot find module 'object-assign' 
    at Function.Module._resolveFilename (module.js:338:15) 
    at Function.Module._load (module.js:280:25) 
    at Module.require (module.js:364:17) 
    at require (module.js:380:17) 
    at Object.<anonymous> (/Users/bearfriend/Sites/angular2/node_modules/gulp/node_modules/gulp-util/lib/PluginError.js:5:20) 
    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 Module.require (module.js:364:17) 

下面是一些產生額外的日誌:

verbose stack Error: [email protected] postinstall: `webdriver-manager update && bower install && gulp pubget.dart && tsd reinstall --config modules/angular2/tsd.json && tsd reinstall --config\ 
tools/tsd.json` 
329 verbose stack Exit status 8 
329 verbose stack  at EventEmitter.<anonymous> (/Users/bearfriend/.nvm/v0.10.38/lib/node_modules/npm/lib/utils/lifecycle.js:213:16) 
329 verbose stack  at EventEmitter.emit (events.js:98:17) 
329 verbose stack  at ChildProcess.<anonymous> (/Users/bearfriend/.nvm/v0.10.38/lib/node_modules/npm/lib/utils/spawn.js:24:14) 
329 verbose stack  at ChildProcess.emit (events.js:98:17) 
329 verbose stack  at maybeClose (child_process.js:766:16) 
329 verbose stack  at Process.ChildProcess._handle.onexit (child_process.js:833:5) 
330 verbose pkgid [email protected] 
331 verbose cwd /Users/bearfriend/Sites/angular2 
332 error Darwin 14.1.0 
333 error argv "node" "/Users/bearfriend/.nvm/v0.10.38/bin/npm" "install" 
334 error node v0.10.38 
335 error npm v2.9.0 
336 error code ELIFECYCLE 
337 error [email protected] postinstall: `webdriver-manager update && bower install && gulp pubget.dart && tsd reinstall --config modules/angular2/tsd.json && tsd reinstall --config tools/tsd.json\ 
` 
337 error Exit status 8 
338 error Failed at the [email protected] postinstall script 'webdriver-manager update && bower install && gulp pubget.dart && tsd reinstall --config modules/angular2/tsd.json && tsd reinstall --c\ 
onfig tools/tsd.json'. 

我不確定我到底在看什麼,所以任何幫助,將不勝感激。我不打算在Dart上做任何工作,所以如果這可以被忽略或拉出,那就沒問題,但我希望能夠正確地設置一切。

回答

1

雖然我還不能確定這是否是與角或NPM問題的錯誤,這裏就是我所做的:

從錯誤信息的理由,

cd node_modules/gulp/node_modules/gulp-util 

確認與package.json它取決於對象分配。 在node_modules中確認它未安裝。

npm install 
cd ../../../.. 
npm install 

瞧!繼續使用build process