npm missing script:dev报错解决方法(亲测有效)

npm missing script:dev报错解决方法(亲测有效)

打开package.json文件:
修改"scripts"{}中的属性内容为:

"scripts": {
     
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint",
    "dev": "vue-cli-service serve",
    "build:prod": "vue-cli-service build",
    "build:stage": "vue-cli-service build --mode staging",
    "preview": "node build/index.js --preview",
    "test:unit": "jest --clearCache && vue-cli-service test:unit",
    "test:ci": "npm run lint && npm run test:unit",
    "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",
    "new": "plop"
  }

再次npm rundev 成功解决

你可能感兴趣的:(javascript)