Vue: 打包的时候报错,报npm ERR missing script: build

看package.json,
有build:xx
将命令改为 npm run build:xx
或者: npm run serve

{
  "name": "navUI",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint"
  },
  "dependencies": {
    "@supermap/iclient-ol": "^10.1.3",
    "@syberos/cli": "^2.2.2",
    "@syberos/jsbridge": "^2.2.2",
    "axios": "^0.21.1",
    "body-parser": "^1.19.0",
    "core-js": "^2.6.5",
    "csvtojson": "^2.0.10",
    "express": "^4.16.3",
    "echarts": "^4.9.0",
    "gcoord" : "^0.3.2",
    "ini": "^1.3.8",
    "jquery": "^3.6.0",
    "nodejs-websocket": "^1.7.2",
    "ol": "^5.3.0",
    "papaparse": "^5.3.1",
    "pdfh5": "^1.3.20",
    "pdfjs-dist": "^2.5.207",
    "supermap": "^0.1.0",
    "vant": "^2.12.6",
    "vconsole": "^3.4.0",
    "vue": "^2.6.10",
    "vue-native-websocket": "^2.0.14",
    "vue-pdf": "^4.2.0",
    "vue-route": "^1.5.1",
    "vue-router": "^3.5.1",
    "vuex": "^3.6.2",
    "vxe-table": "^3.3.8",
    "worker-loader": "^3.0.8",
    "xe-utils": "^3.3.0"
  },
  "devDependencies": {
    "@babel/plugin-proposal-nullish-coalescing-operator": "^7.14.2",
    "@babel/plugin-proposal-optional-chaining": "^7.14.5",
    "@vue/cli-plugin-babel": "^3.12.0",
    "@vue/cli-plugin-eslint": "^3.12.0",
    "@vue/cli-service": "^3.12.0",
    "babel-eslint": "^10.0.1",
    "eslint": "^5.16.0",
    "eslint-plugin-vue": "^5.0.0",
    "vue-template-compiler": "^2.6.10"
  },
  "eslintConfig": {
    "root": true,
    "env": {
      "node": true
    },
    "extends": [
      "plugin:vue/essential",
      "eslint:recommended"
    ],
    "rules": {},
    "parserOptions": {
      "parser": "babel-eslint"
    }
  },
  "postcss": {
    "plugins": {
      "autoprefixer": {}
    }
  },
  "browserslist": [
    "> 1%",
    "last 2 versions"
  ]
}


版权声明:本文为amadeus_liu2原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。