Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ares-chang/uni-vitest-bug-repo
https://github.com/ares-chang/uni-vitest-bug-repo
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/ares-chang/uni-vitest-bug-repo
- Owner: Ares-Chang
- Created: 2024-08-18T10:37:32.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2024-08-18T10:37:46.000Z (5 months ago)
- Last Synced: 2024-11-24T19:36:42.006Z (about 1 month ago)
- Language: SCSS
- Size: 90.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Uni App 搭配 Vitest 错误问题仓库
此仓库拉取自官方模板 [dcloudio/uni-preset-vue#vite-ts](https://github.com/dcloudio/uni-preset-vue/tree/vite-ts),并添加 vitest 库, 为一个最小可复现仓库。
## Use
1. 下载依赖
```sh
npm install
```2. 运行测试
```sh
npm run test
```目标应该测试运行成功,但现在支持报错
```sh
> [email protected] test D:\project\uni-vitest-bug-repo
> vitestThe CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.
编译器版本:4.24(vue3)
正在编译中...⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Startup Error ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Error: Cannot find module 'vuex/package.json'
Require stack:
- D:\project\uni-vitest-bug-repo\node_modules\.pnpm\@[email protected][email protected][email protected][email protected][email protected]_\node_modules\@dcloudio\uni-cli-shared\dist\resolve.js......
```测试库运行并没有包含 vuex 相关应用,不应该加载 vuex 相关依赖,导致运行失败。
如果单独安装 vuex 可运行成功,但这并不是项目应该需要的。
感谢查看,烦请解决,感谢。