mac系统无论是全局还是本地安装都失败
npm ERR! Unexpected end of JSON input while parsing near '...er":"bin/webpack-dev-'
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/wuyang/.npm/_logs/2017-09-11T15_25_44_522Z-debug.log
请问这到底是什么原因
package.json文件如下
{
"name": "seed",
"version": "1.0.0",
"description": "",
"main": "server.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"watch": "node server",
"build": "rimraf dist && webpack --config ./webpack.production.config.js -p --progress --profile --colors"
},
"keywords": [],
"author": "",
"license": "MIT",
"dependencies": {
"antd": "^2.10.4",
"babel-polyfill": "^6.23.0",
"history": "^4.6.3",
"immutable": "^3.8.1",
"md5": "^2.2.1",
"nprogress": "^0.2.0",
"prop-types": "^15.5.10",
"react": "^15.5.4",
"react-dom": "^15.5.4",
"react-redux": "^4.4.8",
"react-router-dom": "^4.1.1",
"redux": "^3.6.0",
"redux-thunk": "^2.2.0",
"whatwg-fetch": "^2.0.3"
},
"devDependencies": {
"babel-core": "^6.24.1",
"babel-eslint": "^7.2.3",
"babel-loader": "^6.4.1",
"babel-plugin-import": "^1.2.1",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-0": "^6.24.1",
"css-loader": "^0.25.0",
"eslint": "^3.19.0",
"eslint-plugin-react": "^6.10.3",
"extract-text-webpack-plugin": "^2.1.0",
"html-webpack-plugin": "^2.28.0",
"less": "^2.7.2",
"less-loader": "^2.2.3",
"react-hot-loader": "^3.0.0-beta.7",
"rimraf": "^2.6.1",
"stats-webpack-plugin": "^0.4.3",
"style-loader": "^0.13.2",
"webpack": "^2.6.1",
"webpack-dev-server": "^2.4.5"
}
}
除了webpack-dev-server其他模块都成功安装了
查看一下你当前目录的package.json是不是格式有问题