用 https://uniapp.dcloud.net.cn/quickstart-cli.html 官方链接 安装后 在升级最新uvm 就会复现
- 发布:2022-07-15 11:12
- 更新:2022-07-15 11:12
- 阅读:867
产品分类: uniapp/小程序/微信
PC开发环境操作系统: Mac
PC开发环境操作系统版本号: 12.2.1
第三方开发者工具版本号: 1.06.2206271
基础库版本号: 2.24.7
项目创建方式: CLI
CLI版本号: alpha
操作步骤:
预期结果:
无法启动 报错
无法启动 报错
实际结果:
能启动
能启动
bug描述:
通过cli 创建项目:
npx degit dcloudio/uni-preset-vue#vite-ts my-vue3-project
yarn dev:mp-weixin // ok 可以正常 没问题
// 升级 到最新
npx @dcloudio/uvm alpha
yarn dev:mp-weixin // err 无法启动 并报错,如下:
▶ yarn dev:mp-weixin
yarn run v1.22.11
warning package.json: No license field
$ uni -p mp-weixin
请注意运行模式下,因日志输出、sourcemap 以及未压缩源码等原因,性能和包体积,均不及发行模式。若要正式发布,请点击发行菜单或使用 cli 发布命令进行发布
正在编译中...
failed to load config from /Users/lyl/Desktop/www/vt/uni-test/vite.config.ts
error during build:
Error: Cannot find module '@dcloudio/uni-app-plus/lib/uni.plugin.js'
Require stack:
- /Users/lyl/Desktop/www/vt/uni-test/node_modules/@dcloudio/vite-plugin-uni/dist/utils/plugin.js
- /Users/lyl/Desktop/www/vt/uni-test/node_modules/@dcloudio/vite-plugin-uni/dist/utils/index.js
- /Users/lyl/Desktop/www/vt/uni-test/node_modules/@dcloudio/vite-plugin-uni/dist/configResolved/plugins/static.js
- /Users/lyl/Desktop/www/vt/uni-test/node_modules/@dcloudio/vite-plugin-uni/dist/configResolved/plugins/index.js
- /Users/lyl/Desktop/www/vt/uni-test/node_modules/@dcloudio/vite-plugin-uni/dist/configResolved/index.js
- /Users/lyl/Desktop/www/vt/uni-test/node_modules/@dcloudio/vite-plugin-uni/dist/index.js
- /Users/lyl/Desktop/www/vt/uni-test/vite.config.ts
- /Users/lyl/Desktop/www/vt/uni-test/node_modules/vite/dist/node/chunks/dep-c9998dc6.js
- /Users/lyl/Desktop/www/vt/uni-test/node_modules/vite/dist/node/index.js
- /Users/lyl/Desktop/www/vt/uni-test/node_modules/@dcloudio/vite-plugin-uni/dist/cli/action.js
- /Users/lyl/Desktop/www/vt/uni-test/node_modules/@dcloudio/vite-plugin-uni/dist/cli/index.js
- /Users/lyl/Desktop/www/vt/uni-test/node_modules/@dcloudio/vite-plugin-uni/bin/uni.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._resolveFilename (/Users/lyl/Desktop/www/vt/uni-test/node_modules/module-alias/index.js:49:29)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at initPlugin (/Users/lyl/Desktop/www/vt/uni-test/node_modules/@dcloudio/vite-plugin-uni/dist/utils/plugin.js:63:18)
at /Users/lyl/Desktop/www/vt/uni-test/node_modules/@dcloudio/vite-plugin-uni/dist/utils/plugin.js:72:26
at Array.map (<anonymous>)
at initPlugins (/Users/lyl/Desktop/www/vt/uni-test/node_modules/@dcloudio/vite-plugin-uni/dist/utils/plugin.js:72:10)
at initExtraPlugins (/Users/lyl/Desktop/www/vt/uni-test/node_modules/@dcloudio/vite-plugin-uni/dist/utils/plugin.js:59:12)
error Command failed with exit code 1.
info Visit
0 个回复