最后一个是日志。。哪个小伙伴能帮忙给的解释不。。多谢。
这是package.json
{
"name": "react-mgm",
"version": "1.2.56",
"description": "",
"main": "src/index.js",
"less": "src/index.less",
"scripts": {
"precommit": "eslint ./src/component/",
"pre": "npm install;",
"clear": "rm -rf build; mkdir build;",
"start": "npm run clear; webpack-dev-server --config webpack.config.dev.js --port 4000 --host 0.0.0.0 --inline --hot --devtool eval --progress --color --profile",
"deploy": "npm install; npm run build && npm run build:min",
"build": "webpack --progress --color --profile",
"build:min": "webpack --config webpack.config.min.js",
"publishpatch": "npm run deploy; git add --all; git commit -m 'c'; npm version patch; git push origin master:master; npm publish; npm publish --registry='https://registry.npmjs.org'; cnpm sync react-mgm; npm version;"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gmfe/react-mgm.git"
},
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/gmfe/react-mgm/issues"
},
"homepage": "https://github.com/gmfe/react-mgm#readme",
"devDependencies": {
"assets-webpack-plugin": "^3.4.0",
"autoprefixer": "^6.3.5",
"babel-core": "^6.7.4",
"babel-loader": "^6.2.4",
"babel-preset-es2015": "^6.6.0",
"babel-preset-react": "^6.5.0",
"babel-preset-stage-0": "^6.5.0",
"classnames": "^2.2.3",
"css-loader": "^0.23.1",
"extract-text-webpack-plugin": "^1.0.1",
"file-loader": "^0.8.5",
"gm-mfont": "^1.0.7",
"gm-util": "^2.0.3",
"husky": "^0.11.4",
"less": "^2.6.1",
"less-loader": "^2.2.3",
"path": "^0.12.7",
"postcss-loader": "^0.8.2",
"precss": "^1.4.0",
"react": "^15.0.1",
"react-addons-css-transition-group": "^15.0.1",
"react-dom": "^15.0.1",
"react-router": "^2.2.4",
"style-loader": "^0.13.1",
"underscore": "^1.8.3",
"url-loader": "^0.5.7",
"webpack": "^1.12.14",
"webpack-dev-server": "^1.14.1"
}
}
看起来应该是缺了一叫
clear
的脚本命令,把你的package.json
贴出来吧补充:
原来如此,你看
clear
命令是这样的:"clear": "rm -rf build; mkdir build;",
,而你的运行环境是windows
的cmd
。好惨,这些rm
之类的命令不能用啊!!!建议:
装了
git
的,可以用git bash
运行,放弃你的cmd
吧。也可以装
Cygwin
(也是一个仿linux shell
的命令行环境),放弃你的cmd
吧建议在Linux下开发nodejs,可以使用virtualbox创建虚拟机…
MING64下 改成这样试试,我感觉你这貌似讲
clear:
识别成一个命令了