build 时报错,系统找不到指定文件是什么原因


F:\huangyuhui20180111\mukewang-dazhongdianping\project\t2267o\react-dianping-getready-combination>npm run build

> react-dianping-webpack@1.0.0 build F:\huangyuhui20180111\mukewang-dazhongdianping\project\t2267o\react-dianping-getready-combination
> rd/s/q build && set NODE_ENV=production && webpack --config webpack.production.config.js --progress --colors

系统找不到指定的文件。

npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
npm ERR! node v7.8.0
npm ERR! npm  v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! react-dianping-webpack@1.0.0 build: `rd/s/q build && set NODE_ENV=production && webpack --config webpack.production.config.js --progress --colors`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the react-dianping-webpack@1.0.0 build script 'rd/s/q build && set NODE_ENV=production && webpack --config webpack.production.config.js --progress --colors'.
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 react-dianping-webpack package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     rd/s/q build && set NODE_ENV=production && webpack --config webpack.production.config.js --progress --colors
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs react-dianping-webpack
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls react-dianping-webpack
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\huang\AppData\Roaming\npm-cache\_logs\2018-01-12T02_54_33_995Z-debug.log

慕粉3725926
浏览 2769回答 1
1回答

Caballarii

build的时候找的是webpack.production.config.js,把你的webpack.config.js复制一份改名webpack.production.config.js就行了,还可以加上压缩插件等等
打开App,查看更多内容
随时随地看视频慕课网APP