2017-01-12 104 views
0

當我運行「npm install」時,它成功運行,它將所有軟件包安裝在node_module文件夾中。但是,當我在cmd中運行「npm start」命令時,它會給出以下錯誤。解決失敗:{錯誤:找不到模塊'npm-watch'

D:\INSM-HTML-Player>npm start 
[email protected] start D:\INSM-HTML-Player 
npm run build && npm run serve | npm run watch 
[email protected] build D:\INSM-HTML-Player 
rollup -c && concat-cli -f dist/main.js -o dist/all.js && npm run compress 
resolve failed: { Error: Cannot find module 'npm-watch' 
at Function.Module._resolveFilename (module.js:469:15) 
at Function.requireRelative.resolve (D:\INSM-HTML-Player\node_modules\requir e-relative\index.js:30:17) 
at resolve (D:\INSM-HTML-Player\node_modules\modify-babel-preset\lib\seriali ze.js:25:26) 
at findAndRemove (D:\INSM-HTML-Player\node_modules\modify-babel-preset\lib\s erialize.js:67:11) 
at D:\INSM-HTML-Player\node_modules\modify-babel-preset\lib\serialize.js:111:13 at Array.map (native) 
at loadPreset (D:\INSM-HTML-Player\node_modules\modify-babel-preset\lib\serialize.js:103:29) 
at module.exports (D:\INSM-HTML-Player\node_modules\modify-babel-preset\inde x.js:97:19) 
at Object.<anonymous> (D:\INSM-HTML-Player\node_modules\babel-preset-es2015-rollup\index.js:3:18) 
at Module._compile (module.js:570:32) code: 'MODULE_NOT_FOUND' } npm-watch resolve failed: { Error: Cannot find module 'grunt-cli' 
at Function.Module._resolveFilename (module.js:469:15) 
at Function.requireRelative.resolve (D:\INSM-HTML-Player\node_modules\requir e-relative\index.js:30:17) 
at resolve (D:\INSM-HTML-Player\node_modules\modify-babel-preset\lib\seriali ze.js:25: at findAndRemove (D:\INSM-HTML-Player\node_modules\modify-babel-preset\lib\s erialize.js:67:11) 
at D:\INSM-HTML-Player\node_modules\modify-babel-preset\lib\serialize.js:111:13 
at Array.map (native) 
at loadPreset (D:\INSM-HTML-Player\node_modules\modify-babel-preset\lib\serialize.js:103:29) 
at module.exports (D:\INSM-HTML-Player\node_modules\modify-babel-preset\index.js:97:19) 
at Object.<anonymous> (D:\INSM-HTML-Player\node_modules\babel-preset-es2015-rollup\index.js:3:18) 
at Module._compile (module.js:570:32) code: 'MODULE_NOT_FOUND' } gruntcli C:\Program Files\nodejs\node.exe D:\INSM-HTML-Player\node_modules\rollup\bin\rollup concat-cli -f string -o string 

Options: -f, --files files or glob/wildcard to be matched and concatenated 
                  [array] [required] 

-o, --output the resulting file of the concatenation[string] [default: "all"] 

--helpShow help [boolean]Examples: concat-cli -f *.js -o bundle.js This will concatenate all the js files in the current directory into a bundle.js Missing required argument: f 
npm ERR! Windows_NT 6.1.7601 
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe""C:\\ProgramFiles\\nodejs\\node_modules\\npm\\bin\\npm cli.js" "run" "build" 
npm ERR! node v6.9.4 
npm ERR! npm v3.10.10 
npm ERR! code ELIFECYCLE 
npm ERR! [email protected] build: `rollup -c && concat-cli -f dist/main.js o dist/all.js && npm run compress` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] build script 'rollup -c && concat cli - f dist/main.js -o dist/all.js && npm run compress'. 

npm ERR! Make sure you have the latest version of node.js and npm installed. 
npm ERR! If you do, this is most likely a problem with the insm-player package, 
npm ERR! not with npm itself. npm ERR! Tell 

the author that this fails on your system: 
npm ERR!  rollup -c && 
concat-cli -f dist/main.js -o dist/all.js && npm run c ompress npm 
ERR! You can get information on how to open an issue for this project 
with: 
npm ERR!  npm bugs insm-player npm ERR! Or if that isn't 

available, you can get their info via: npm ERR!  npm owner ls 
insm-player 
npm ERR! There is likely additional logging output 
above. 
npm ERR! Please include the following file with any support request: 
npm ERR!  D:\INSM-HTML-Player\npm-debug.log 
npm ERR! Windows_NT 6.1.7601 
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\ node_modules\\npm\\bin\\npm-cli.js" "start" npm 
ERR! node v6.9.4 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE 
npm ERR! [email protected] start: `npm run build && npm run serve | 
npm run watch` 
npm ERR! Exit status 1 npm ERR! npm ERR! Failed 

at the [email protected] start script 'npm run build && npm run 
serve | npm run watch'. 
npm ERR! Make sure you have the latest version of node.js and npm installed. 
npm ERR! If you do, this is most likely a problem with the insm-player package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  npm run build && npm run serve | npm run watch 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs insm-player 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR!  npm owner ls insm-player 
npm ERR! There is likely additional logging output above. 

npm ERR! Please include the following file with any support request: 
npm ERR!  D:\INSM-HTML-Player\npm-debug.log 
+0

您是否嘗試手動安裝缺少的模塊? –

回答

1

您必須將丟失的包裹NPM-表添加到package.json

npm install npm-watch --save-dev 

運行npm start一次。

相關問題