iview / iview-project

This project is build for Vue.js 2 + vue-router + webpack2 + iView 3
MIT License
839 stars 389 forks source link

执行npm run init的时候提示没有这个命令,该如何处理? #33

Closed huanghui8030 closed 7 years ago

huanghui8030 commented 7 years ago

请问,执行npm run init后,提示“missing script: init”,该如何处理 image

huanghui8030 commented 7 years ago

已解决,初始化后,package.json重新加载了,在script里面定义命令都没有,需要重新添加一下。

 "scripts": {
    "init": "webpack --progress --config webpack.dev.config.js",
    "dev": "webpack-dev-server --content-base ./ --open --inline --hot --compress --history-api-fallback --config webpack.dev.config.js",
    "build": "webpack --progress --hide-modules --config webpack.prod.config.js"
  },

如下: image