账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    mac系统nodev8.4.0安装webpack-dev-server失败
    • 2017-09-12 00:00
    • 11
    30
    0

    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其他模块都成功安装了

    0
    打赏
    收藏
    点击回答
    您的回答被采纳后将获得:提问者悬赏的 11 元积分
        全部回答
    • 0
    • 圈ぐ心ㄅ 普通会员 1楼
      502 Bad Gateway

      502 Bad Gateway


      nginx
    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部