2017-01-15 71 views
1

運行npm install時出現一個在其他計算機上無法重現的錯誤。安裝完所有東西並運行webpack後,它會發出錯誤信息。當查看webpack應該安裝的目錄時,它甚至不存在。這是一個在Mac上已知的npm安裝錯誤?運行 npm installNPM安裝錯誤

錯誤:

> [email protected] postinstall /Users/mackenzie/Desktop/omitted/www 
> npm run webpack-build 


> [email protected] webpack-build /Users/mackenzie/Desktop/omitted/www 
> NODE_ENV=production ./node_modules/.bin/webpack -p --no-color 

sh: ./node_modules/.bin/webpack: No such file or directory 

npm ERR! Darwin 15.6.0 
npm ERR! argv "/usr/local/Cellar/node/7.4.0/bin/node" "/Users/mackenzie/Desktop/omitted/www/node_modules/.bin/npm" "run" "webpack-build" 
npm ERR! node v7.4.0 
npm ERR! npm v3.10.9 
npm ERR! file sh 
npm ERR! code ELIFECYCLE 
npm ERR! errno ENOENT 
npm ERR! syscall spawn 
npm ERR! [email protected] webpack-build: `NODE_ENV=production ./node_modules/.bin/webpack -p --no-color` 
npm ERR! spawn ENOENT 
npm ERR! 
npm ERR! Failed at the [email protected] webpack-build script 'NODE_ENV=production ./node_modules/.bin/webpack -p --no-color'. 
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 www package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  NODE_ENV=production ./node_modules/.bin/webpack -p --no-color 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs www 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR!  npm owner ls www 
npm ERR! There is likely additional logging output above. 

npm ERR! Please include the following file with any support request: 
npm ERR!  /Users/mackenzie/Desktop/omitted/www/npm-debug.log 

npm WARN [email protected] No license field. 
npm ERR! Darwin 15.6.0 
npm ERR! argv "/usr/local/Cellar/node/7.4.0/bin/node" "/usr/local/bin/npm" "install" 
npm ERR! node v7.4.0 
npm ERR! npm v4.0.5 
npm ERR! code ELIFECYCLE 
npm ERR! [email protected] postinstall: `npm run webpack-build` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] postinstall script 'npm run webpack-build'. 
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 www package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  npm run webpack-build 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs www 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR!  npm owner ls www 

的package.json

"scripts": { 
    "lint": "semistandard web/js/orders/* web/js/categories/* web/js/orders/* web/js/site/* web/js/user/*", 
    "webpack-dev": "NODE_ENV=development ./node_modules/.bin/webpack --watch --progress", 
    "webpack-build": "NODE_ENV=production ./node_modules/.bin/webpack -p --no-color", 
    "postinstall": "npm run webpack-build" 
    }, 
    "devDependencies": { 
    "autoprefixer": "^6.5.2", 
    "babel-core": "^6.18.2", 
    "babel-loader": "^6.2.7", 
    "babel-polyfill": "^6.16.0", 
    "babel-preset-es2015": "^6.18.0", 
    "babel-preset-react": "^6.16.0", 
    "browser-sync": "^2.17.5", 
    "browser-sync-webpack-plugin": "^1.1.3", 
    "css-loader": "^0.25.0", 
    "eslint": "^3.10.1", 
    "eslint-config-semistandard": "^7.0.0", 
    "eslint-config-standard": "^6.2.1", 
    "eslint-config-standard-react": "^4.2.0", 
    "eslint-loader": "^1.6.1", 
    "eslint-plugin-promise": "^3.3.2", 
    "eslint-plugin-standard": "^2.0.1", 
    "extract-text-webpack-plugin": "^1.0.1", 
    "file-loader": "^0.9.0", 
    "less": "^2.7.1", 
    "less-loader": "^2.2.3", 
    "path": "^0.12.7", 
    "postcss-loader": "^1.1.0", 
    "semistandard": "^9.0.0", 
    "style-loader": "^0.13.1", 
    "url-loader": "^0.5.7", 
    "webpack": "^1.13.3", 
    "webpack-dev-middleware": "^1.8.4", 
    "webpack-hot-middleware": "^2.13.1" 
    }, 
    "dependencies": { 
    "i": "^0.3.5", 
    "lodash": "^4.16.6", 
    "npm": "^3.10.9", 
    "react": "^15.3.2", 
    "react-addons-css-transition-group": "^15.3.2", 
    "react-dom": "^15.3.2" 
    } 
+0

我得到同樣的錯誤... –

回答

0

NPM挑選不同

npm ERR! npm v3.10.9 
npm ERR! npm v4.0.5 
+0

仍然收到錯誤儘管更改版本。它仍然給我一個沒有這樣的文件或目錄;同樣的錯誤。 – Goodwin

+0

請以新錯誤更新日誌 – Sarvex