赵永强
赵永强
  • 发布:2021-12-15 22:55
  • 更新:2022-03-01 01:09
  • 阅读:2089

vite+ts+vue3小程序编译失败,浏览器没问题

分类:uni-app

E:\code\uni-preset-vue-vite-ts\node_modules\cac\dist\index.js:404
22:53:04.402 throw new CACError(Unknown option \${name.length > 1 ? --${name} : -${name}}`); 22:53:04.402 ^ 22:53:04.402 CACError: Unknown option--watch`
22:53:04.402 at Command.checkUnknownOptions (E:\code\uni-preset-vue-vite-ts\node_modules\cac\dist\index.js:404:17)
22:53:04.402 at CAC.runMatchedCommand (E:\code\uni-preset-vue-vite-ts\node_modules\cac\dist\index.js:602:13)
22:53:04.402 at CAC.parse (E:\code\uni-preset-vue-vite-ts\node_modules\cac\dist\index.js:541:12)
22:53:04.402 at Object.<anonymous> (E:\code\uni-preset-vue-vite-ts\node_modules\@dcloudio\vite-plugin-uni\dist\cli\index.js:50:5)
22:53:04.418 at Module._compile (internal/modules/cjs/loader.js:1063:30)
22:53:04.418 at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
22:53:04.418 at Module.load (internal/modules/cjs/loader.js:928:32)
22:53:04.418 at Function.Module._load (internal/modules/cjs/loader.js:769:14)
22:53:04.418 at Module.require (internal/modules/cjs/loader.js:952:19)
22:53:04.418 at require (internal/modules/cjs/helpers.js:88:18)

2021-12-15 22:55 负责人:无 分享
已邀请:
x***@vip.qq.com

x***@vip.qq.com

你用的uni-preset-vue-vite-ts这种模板直接点运行是不可以的,直接运行命令行 "npm run dev:mp-weixin"

  • 2***@qq.com

    然后具体需要什么操作?

    2022-03-08 18:43

  • 2***@qq.com

    https://blog.csdn.net/weixin_43814775/article/details/123360516 这个链接有帮助

    2022-03-08 19:19

shengjiso

shengjiso

解决了么?我也遇到这个问题。编译小程序失败

  • 2***@qq.com

    https://blog.csdn.net/weixin_43814775/article/details/123360516 这个链接有帮助

    2022-03-08 19:19

该问题目前已经被锁定, 无法添加新回复