编译失败
Closed this issue · 3 comments
Description
在windows10下面, 编译出现
`src/service/http/alova.ts:7:8 - error TS1192: Module '"C:/Users/user/IdeaProjects/nova-admin/node_modules/.pnpm/alova@3.0.4/node_modules/alova/typings/fetch"' has no default export.
7 import adapterFetch from 'alova/fetch'
~~~~~~~~~~~~
Found 1 error in src/service/http/alova.ts:7
`
提示 没有 default export., 但是查看了 alova 代码, 是有 export 的.
一直无法编译成功, run dev 模式正常, 不报错.
Expected
node 20.x 版本 另外在Linux下也无法编译成功,但是 dev run 正常
Additional comments
No response
Validations
- Ensure this issue not a bug proposal.
- Read the docs.
- Check that there isn't already an issue that descript the same thing to avoid creating a duplicate.
PS C:\Users\user\IdeaProjects\nova-admin> pnpm build
nova-admin@0.9.8 build C:\Users\user\IdeaProjects\nova-admin
vue-tsc --noEmit && vite build --mode prod
src/service/http/alova.ts:7:8 - error TS1192: Module '"C:/Users/user/IdeaProjects/nova-admin/node_modules/.pnpm/alova@3.0.16/node_modules/alova/typings/fetch"' has no default export.
7 import adapterFetch from 'alova/fetch'
~~~~~~~~~~~~
Found 1 error in src/service/http/alova.ts:7
仍然提示这个错误, 我是刚开始用3.0.16版本, 一直提示错误才切换到低版本, 仍然提示错误.
编辑器 ieda , node 版本 20.17.0,
直接使用 vite build --mode prod 跳过类型检查尝试