dcloudio / uni-app

A cross-platform framework using Vue.js
https://uniapp.dcloud.io
Apache License 2.0
40.2k stars 3.64k forks source link

npx @dcloudio/uvm alpha 命令报错 #3411

Closed a1mersnow closed 2 years ago

a1mersnow commented 2 years ago

报错:

/Users/orange/.npm/_npx/f06a30b2e514f95e/node_modules/@dcloudio/uvm/lib/package.js:16
    throw new Error('Invalid version: ' + version)
          ^

Error: Invalid version: 3.0.0-alpha-3040420220402006
    at getVue3 (/Users/orange/.npm/_npx/f06a30b2e514f95e/node_modules/@dcloudio/uvm/lib/package.js:16:11)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async get (/Users/orange/.npm/_npx/f06a30b2e514f95e/node_modules/@dcloudio/uvm/lib/package.js:37:12)
    at async start (/Users/orange/.npm/_npx/f06a30b2e514f95e/node_modules/@dcloudio/uvm/bin/index.js:17:16)

当前的package.json:

{
  "name": "uni-preset-vue",
  "version": "0.0.0",
  "scripts": {
    "dev:app": "uni -p app",
    "dev:custom": "uni -p",
    "dev:h5": "uni",
    "dev:h5:ssr": "uni --ssr",
    "dev:mp-alipay": "uni -p mp-alipay",
    "dev:mp-baidu": "uni -p mp-baidu",
    "dev:mp-kuaishou": "uni -p mp-kuaishou",
    "dev:mp-lark": "uni -p mp-lark",
    "dev:mp-qq": "uni -p mp-qq",
    "dev:mp-toutiao": "uni -p mp-toutiao",
    "dev:mp-weixin": "uni -p mp-weixin",
    "dev:quickapp-webview": "uni -p quickapp-webview",
    "dev:quickapp-webview-huawei": "uni -p quickapp-webview-huawei",
    "dev:quickapp-webview-union": "uni -p quickapp-webview-union",
    "build:app": "uni build -p app",
    "build:custom": "uni build -p",
    "build:h5": "uni build",
    "build:h5:ssr": "uni build --ssr",
    "build:mp-alipay": "uni build -p mp-alipay",
    "build:mp-baidu": "uni build -p mp-baidu",
    "build:mp-kuaishou": "uni build -p mp-kuaishou",
    "build:mp-lark": "uni build -p mp-lark",
    "build:mp-qq": "uni build -p mp-qq",
    "build:mp-toutiao": "uni build -p mp-toutiao",
    "build:mp-weixin": "uni build -p mp-weixin",
    "build:quickapp-webview": "uni build -p quickapp-webview",
    "build:quickapp-webview-huawei": "uni build -p quickapp-webview-huawei",
    "build:quickapp-webview-union": "uni build -p quickapp-webview-union"
  },
  "dependencies": {
    "@dcloudio/uni-app": "3.0.0-alpha-3031320220314002",
    "@dcloudio/uni-app-plus": "3.0.0-alpha-3031320220314002",
    "@dcloudio/uni-components": "3.0.0-alpha-3031320220314002",
    "@dcloudio/uni-h5": "3.0.0-alpha-3031320220314002",
    "@dcloudio/uni-mp-alipay": "3.0.0-alpha-3031320220314002",
    "@dcloudio/uni-mp-baidu": "3.0.0-alpha-3031320220314002",
    "@dcloudio/uni-mp-kuaishou": "3.0.0-alpha-3031320220314002",
    "@dcloudio/uni-mp-lark": "3.0.0-alpha-3031320220314002",
    "@dcloudio/uni-mp-qq": "3.0.0-alpha-3031320220314002",
    "@dcloudio/uni-mp-toutiao": "3.0.0-alpha-3031320220314002",
    "@dcloudio/uni-mp-weixin": "3.0.0-alpha-3031320220314002",
    "@dcloudio/uni-quickapp-webview": "3.0.0-alpha-3031320220314002",
    "vue": "^3.2.31",
    "vue-i18n": "^9.1.9",
    "vuex": "^4.0.2"
  },
  "devDependencies": {
    "@dcloudio/types": "^2.5.17",
    "@dcloudio/uni-automator": "3.0.0-alpha-3031320220314002",
    "@dcloudio/uni-cli-shared": "3.0.0-alpha-3031320220314002",
    "@dcloudio/vite-plugin-uni": "3.0.0-alpha-3031320220314002",
    "autoprefixer": "^10.4.2",
    "vite": "^2.8.6"
  }
}
a1mersnow commented 2 years ago

另外 npx @dcloudio/uvm 命令不是更新到正式版的最新版吗? 我运行之后并没有什么变化,而我查看 npm 上的信息跟项目中的依赖不一致:

image
a1mersnow commented 2 years ago

难道 alpha 是指 3.0.0-alpha-xxx 中的 alpha?跟这里不是一个意思?

image
a1mersnow commented 2 years ago

感觉你们的版本管理看着好乱,有没有好心人讲解一下这其中的关系……

zhetengbiji commented 2 years ago

是的,没有错,网络问题,重新执行 npx @dcloudio/uvm alpha