vue cli3项目,执行出现Invalid version错误,怎么解决?

发布于 2022-09-11 23:26:14 字数 2223 浏览 12 评论 0

我在网上下载了一份脚手架文件,修改了一些作者、版本号等信息,
但执行出现如图所示问题,怎么解决呢?
我试了npm update也没用。
QQ浏览器截图20191111095030.png
QQ浏览器截图20191111095049.png

【编辑,以下是package.json】

{
  "name": "cli3demo",
  "version": "1.0",
  "description": "H5",
  "author": "xjl",
  "license": "",
  "scripts": {
    "dev": "vue-cli-service serve --open --fix",
    "build:prod": "vue-cli-service build",
    "build:stage": "vue-cli-service build --mode staging",
    "preview": "node build/index.js --preview",
    "lint": "eslint --ext .js,.vue src",
    "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"
  },
  "dependencies": {
    "@antv/f2": "^3.4.1",
    "axios": "0.18.0",
    "fastclick": "^1.0.6",
    "lib-flexible": "^0.3.2",
    "lodash": "^4.17.15",
    "normalize.css": "7.0.0",
    "vant": "^2.2.5",
    "vue": "2.6.10",
    "vue-router": "3.0.6",
    "vuex": "3.1.0"
  },
  "devDependencies": {
    "@babel/core": "7.0.0",
    "@babel/register": "7.0.0",
    "@vue/cli-plugin-babel": "3.6.0",
    "@vue/cli-plugin-eslint": "3.6.0",
    "@vue/cli-plugin-unit-jest": "3.6.3",
    "@vue/cli-service": "3.6.0",
    "@vue/test-utils": "1.0.0-beta.29",
    "babel-core": "7.0.0-bridge.0",
    "babel-eslint": "10.0.1",
    "babel-jest": "23.6.0",
    "babel-plugin-import": "^1.11.2",
    "chalk": "2.4.2",
    "compression-webpack-plugin": "^3.0.0",
    "connect": "3.6.6",
    "eslint": "5.15.3",
    "eslint-plugin-vue": "5.2.2",
    "html-webpack-plugin": "3.2.0",
    "node-sass": "^4.9.0",
    "postcss-pxtorem": "^4.0.1",
    "runjs": "^4.3.2",
    "sass-loader": "^7.1.0",
    "script-ext-html-webpack-plugin": "2.1.3",
    "script-loader": "0.7.2",
    "serve-static": "^1.13.2",
    "svgo": "1.2.2",
    "vue-template-compiler": "2.6.10"
  },
  "engines": {
    "node": ">=8.9",
    "npm": ">= 3.0.0"
  },
  "browserslist": [
    "> 1%",
    "last 2 versions",
    "not ie <= 8"
  ]
}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

残月升风 2022-09-18 23:26:14

报错提示的是 无效的版本号,你看下第三行代码,1.0 改为 1.0.0 试试看

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文