Description
Describe the bug
pnpm create @quick-start/electron 创建项目,执行pnpm i,再执行 pnpm remove @electron-toolkit/preload @electron-toolkit/utils @electron-toolkit/eslint-config-prettier @electron-toolkit/eslint-config-ts @electron-toolkit/tsconfig eslint-plugin-react-refresh eslint-plugin-react-hooks eslint-plugin-react之后,对源码依赖进行删除后,再执行pnpm build,出现错误
PS F:\pro\1\test> pnpm run build
[email protected] build F:\pro\1\test
npm run typecheck && electron-vite build
[email protected] typecheck
npm run typecheck:node && npm run typecheck:web
[email protected] typecheck:node
tsc --noEmit -p tsconfig.node.json
../node_modules/.pnpm/[email protected]_vite@6.3.5_@types[email protected]_/node_modules/electron-vite/dist/index.d.ts:3:33 - error TS2307: Cannot find module '@swc/core' or its corresponding type declarations.
3 import { TransformConfig } from '@swc/core';
~~~~~~~~~~~
../node_modules/.pnpm/vite@6.3.5_@types[email protected]/node_modules/vite/dist/node/index.d.ts:5:41 - error TS2307: Cannot find module 'rollup/parseAst' or its corresponding type declarations.
There are types at 'F:/pro/1/node_modules/.pnpm/vite@6.3.5_@types[email protected]/node_modules/rollup/dist/parseAst.d.ts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.
5 export { parseAst, parseAstAsync } from 'rollup/parseAst';
~~~~~~~~~~~~~~~~~
Found 2 errors in 2 files.
Errors Files
1 ../node_modules/.pnpm/[email protected]_vite@6.3.5_@types[email protected]_/node_modules/electron-vite/dist/index.d.ts:3
1 ../node_modules/.pnpm/vite@6.3.5_@types[email protected]/node_modules/vite/dist/node/index.d.ts:5
ELIFECYCLE Command failed with exit code 2.
PS F:\pro\1\test>
Electron-Vite Version
3.1.0
Electron Version
35.1.5
Vite Version
6.2.6
Validations
- Follow the Code of Conduct.
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.