2***@qq.com
2***@qq.com
  • 发布:2023-11-28 10:29
  • 更新:2023-11-28 12:09
  • 阅读:782

vue3+ts+vite的uni脚手架无法运行,@dcloudio/vite-plugin-uni报错uni is not a function

分类:uni-app

一段时间不更新后,脚手架就不能用了

项目版本目录
{
"name": "uni-preset-vue",
"version": "0.0.0",
"type": "module",
"scripts": {
"dev:int": "uni --mode int",
"dev:stg": "uni --mode stg",
"dev:prod": "uni --mode prod",
"dev:test": "uni --mode test",
"build:stg": "uni build --mode stg",
"build:prod": "uni build --mode prod",
"build:int": "uni build --mode int",
"build:test": "uni build --mode test",
"build:delp": "node ./deploy/index.js"
},
"dependencies": {
"@dcloudio/uni-app": "3.0.0-3090820231124001",
"@dcloudio/uni-app-plus": "3.0.0-3090820231124001",
"@dcloudio/uni-components": "3.0.0-3090820231124001",
"@dcloudio/uni-h5": "3.0.0-3090820231124001",
"@dcloudio/uni-mp-alipay": "3.0.0-3090820231124001",
"@dcloudio/uni-mp-baidu": "3.0.0-3090820231124001",
"@dcloudio/uni-mp-jd": "3.0.0-3090820231124001",
"@dcloudio/uni-mp-kuaishou": "3.0.0-3090820231124001",
"@dcloudio/uni-mp-lark": "3.0.0-3090820231124001",
"@dcloudio/uni-mp-qq": "3.0.0-3090820231124001",
"@dcloudio/uni-mp-toutiao": "3.0.0-3090820231124001",
"@dcloudio/uni-mp-weixin": "3.0.0-3090820231124001",
"@dcloudio/uni-mp-xhs": "3.0.0-3090820231124001",
"@dcloudio/uni-quickapp-webview": "3.0.0-3090820231124001",
"@vueuse/core": "^10.1.0",
"autoprefixer": "^10.4.14",
"await-to-js": "^3.0.0",
"axios": "^1.3.5",
"chalk": "^5.3.0",
"crypto-js": "^4.1.1",
"dingtalk-jsapi": "^3.0.20",
"docx-preview": "^0.1.15",
"docx4js": "^3.2.20",
"i": "^0.3.7",
"jsencrypt": "^3.3.2",
"mammoth": "^1.6.0",
"mitt": "^3.0.0",
"moment": "^2.29.4",
"ora": "^7.0.1",
"path": "^0.12.7",
"pdfh5": "^1.4.3",
"pdfjs-dist": "^2.0.101",
"pinia": "2.0.36",
"pinia-plugin-persist": "^1.0.0",
"postcss-pxtorem": "^6.0.0",
"rollup-plugin-visualizer": "^5.9.2",
"sass": "^1.62.0",
"scp2": "^0.5.0",
"ssh2": "^1.14.0",
"stream-to-blob": "^2.0.1",
"uni-crazy-router": "^1.1.3",
"uni-vite-plugin-h5-prod-effect": "^1.0.1",
"unplugin-auto-import": "^0.15.3",
"uuid": "^9.0.0",
"vant": "^4.2.0",
"vconsole": "^3.15.1",
"vue": "^3.2.45",
"vue-i18n": "^9.1.9",
"vue-pdf-embed": "^1.1.6"
},
"devDependencies": {
"@dcloudio/types": "^3.3.2",
"@dcloudio/uni-automator": "3.0.0-3090820231124001",
"@dcloudio/uni-cli-shared": "3.0.0-3090820231124001",
"@dcloudio/uni-stacktracey": "3.0.0-3090820231124001",
"@dcloudio/vite-plugin-uni": "3.0.0-3090820231124001",
"@types/crypto-js": "^4.1.1",
"@types/downloadjs": "^1.4.3",
"@types/jsrsasign": "^10.5.8",
"@types/uuid": "^9.0.2",
"@vitejs/plugin-legacy": "^4.0.4",
"@vue/runtime-core": "^3.2.45",
"@vue/tsconfig": "^0.1.3",
"terser": "^5.16.9",
"typescript": "^4.9.4",
"unplugin-vue-components": "^0.25.1",
"vite": "4.0.3",
"vite-plugin-compression": "^0.5.1",
"vite-plugin-imagemin": "^0.6.1",
"vue-tsc": "^1.0.24"
}
}

2023-11-28 10:29 负责人:无 分享
已邀请:
YUANRJ

YUANRJ

"type": "module"去掉,然后重新安装依赖。

要回复问题请先登录注册