2017-10-19 111 views
0

請我在這裏需要一些幫助,NPM運行生成錯誤

後I型NPM運行建立到我的Windows 10的終端,這裏有錯誤出現

「imagemin '不被識別爲內部或外部命令, 可操作的程序或批處理文件。 npm ERR!代碼ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] imagemin:imagemin img/* -o dist/img npm ERR!退出狀態1 npm ERR! npm ERR!在 [email protected] imagemin腳本失敗。 npm ERR!這可能不是npm的 問題。上面可能還有其他日誌記錄輸出。 npm ERR!此運行的完整日誌可以在以下網址找到:npm ERR!
C:\ Users \ ndunga \ AppData \ Roaming \ npm-cache_logs \ 2017-10-19T16_46_04_328Z-debug.log npm ERR!代碼ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] build:npm run clean && npm run copyfonts && npm run imagemin && npm run usemin npm ERR!退出狀態1 npm ERR! npm ERR!在 [email protected]構建腳本失敗。 npm ERR!這可能不是問題 與npm。上面可能還有其他日誌記錄輸出。 npm ERR! A 此運行的完整日誌可以在以下網址找到:npm ERR!
C:\用戶\ ndunga \應用程序數據\漫遊\ NPM-cache_logs \ 2017-10-19T16_46_04_381Z-的debug.log

這裏是我的package.json文件

{ 
    "name": "confusion", 
    "version": "1.0.0", 
    "description": "This is a website for Ristorante Con Fusion", 
    "main": "index.html", 
    "scripts": { 
    "start": "npm run watch:all", 
    "test": "echo \"Error: no test specified\" && exit 1", 
    "lite": "lite-server", 
    "scss": "node-sass -o css/ css/", 
    "watch:scss": "onchange \"css/*.scss\" -- npm run scss", 
    "watch:all": "parallelshell \"npm run watch:scss\" \"npm run lite\"", 
    "clean": "rimraf dist", 
    "copyfonts": "copyfiles -f node_modules/font-awesome/fonts/* dist/fonts", 
    "imagemin": "imagemin img/* -o dist/img", 
    "usemin": "usemin contactus.html -d dist --htmlmin -o dist/contactus.html && usemin aboutus.html -d dist --htmlmin -o dist/aboutus.html && usemin index.html -d dist --htmlmin -o dist/index.html", 
    "build": "npm run clean && npm run copyfonts && npm run imagemin && npm run usemin" 
    }, 
    "author": "", 
    "license": "ISC", 
    "devDependencies": { 
    "cssmin": "^0.4.3", 
    "htmlmin": "0.0.7", 
    "lite-server": "^2.2.2", 
    "node-sass": "^4.5.3", 
    "onchange": "^3.2.1", 
    "parallelshell": "^3.0.2", 
    "rimraf": "^2.6.2", 
    "uglifyjs": "^2.4.11", 
    "usemin-cli": "^0.5.1" 
    }, 
    "dependencies": { 
    "bootstrap": "^4.0.0-alpha.6", 
    "font-awesome": "^4.7.0" 
    } 
} 

回答

0

你不已安裝imagemin軟件包。

npm install imagemin --save