Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: build报错 #4664

Closed
5 tasks done
TNGsimon opened this issue Oct 17, 2024 · 2 comments
Closed
5 tasks done

Bug: build报错 #4664

TNGsimon opened this issue Oct 17, 2024 · 2 comments

Comments

@TNGsimon
Copy link

Version

Vben Admin V5

Describe the bug?

dev可以正常运行,但是run build都不行,在外面和在app里面都不行,turbo日志如下:

@vben/web-antd@5.4.0 build E:\qianduan\GIT_公网\vben5\vue-vben-admin\apps\web-antd
pnpm vite build --mode production

�[33mThe CJS build of Vite's Node API is deprecated. See https://vite.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.�[39m
�[36mvite v5.4.9 �[32mbuilding for production...�[36m�[39m
node:internal/process/promises:391
triggerUncaughtException(err, true /* fromPromise */);
^

[Failed to load PostCSS config: Failed to load PostCSS config (searchPath: E:/qianduan/GIT_公网/vben5/vue-vben-admin/apps/web-antd): [Error] Loading PostCSS Plugin failed: Cannot find module 'cssnano'
Require stack:

  • E:\qianduan\GIT_公网\vben5\vue-vben-admin\apps\web-antd\postcss.config.mjs

(@e:\qianduan\GIT_公网\vben5\vue-vben-admin\apps\web-antd\postcss.config.mjs)
Error: Loading PostCSS Plugin failed: Cannot find module 'cssnano'
Require stack:

  • E:\qianduan\GIT_公网\vben5\vue-vben-admin\apps\web-antd\postcss.config.mjs

(@e:\qianduan\GIT_公网\vben5\vue-vben-admin\apps\web-antd\postcss.config.mjs)
at load (file:///E:/qianduan/GIT_%E5%85%AC%E7%BD%91/vben5/vue-vben-admin/node_modules/.pnpm/vite@5.4.9_@types+node@22.7.5_less@4.2.0_sass@1.79.5_terser@5.34.1/node_modules/vite/dist/node/chunks/dep-Cyk9bIUq.js:33631:11)
at file:///E:/qianduan/GIT_%E5%85%AC%E7%BD%91/vben5/vue-vben-admin/node_modules/.pnpm/vite@5.4.9_@types+node@22.7.5_less@4.2.0_sass@1.79.5_terser@5.34.1/node_modules/vite/dist/node/chunks/dep-Cyk9bIUq.js:33656:16
at Array.map ()
at plugins (file:///E:/qianduan/GIT_%E5%85%AC%E7%BD%91/vben5/vue-vben-admin/node_modules/.pnpm/vite@5.4.9_@types+node@22.7.5_less@4.2.0_sass@1.79.5_terser@5.34.1/node_modules/vite/dist/node/chunks/dep-Cyk9bIUq.js:33655:8)
at processResult (file:///E:/qianduan/GIT_%E5%85%AC%E7%BD%91/vben5/vue-vben-admin/node_modules/.pnpm/vite@5.4.9_@types+node@22.7.5_less@4.2.0_sass@1.79.5_terser@5.34.1/node_modules/vite/dist/node/chunks/dep-Cyk9bIUq.js:33725:14)
at file:///E:/qianduan/GIT_%E5%85%AC%E7%BD%91/vben5/vue-vben-admin/node_modules/.pnpm/vite@5.4.9_@types+node@22.7.5_less@4.2.0_sass@1.79.5_terser@5.34.1/node_modules/vite/dist/node/chunks/dep-Cyk9bIUq.js:33855:14]

Node.js v20.15.1
 ELIFECYCLE  Command failed with exit code 1.

Reproduction

System Info

System:
    OS: windows 10
    Node: 20.15.1
    npm: 10.7.0
    pnpm: 9.12.1

Relevant log output

No response

Validations

@anncwb
Copy link
Collaborator

anncwb commented Oct 17, 2024

请看看文档,路径不要有中文。然后重新reinstall下在执行

@anncwb anncwb closed this as completed Oct 17, 2024
@TNGsimon
Copy link
Author

多谢,可以了,但是run dev就没问题Q_Q

@github-actions github-actions bot locked and limited conversation to collaborators Nov 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants