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

执行 pnpm dev时,visual studio code控制台输出信息:The CJS build of Vite's Node API is deprecated,以及一条错误信息 #6376

Open
citynook opened this issue Jun 20, 2024 · 0 comments

Comments

@citynook
Copy link

citynook commented Jun 20, 2024

版本号:

3.7.0

问题描述:

执行 pnpm dev时,visual studio code控制台输出信息如下:

The CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.

 WARN  plugin 'vite:@rys-fe/inject-vite-plugin-theme-client' uses deprecated 'enforce' option. Use 'order' option instead.                                            13:54:10

 WARN  plugin 'vite:@rys-fe/inject-vite-plugin-theme-client' uses deprecated 'transform' option. Use 'handler' option instead.                                        13:54:10

 ERROR  (node:3196) [DEP0147] DeprecationWarning: In future versions of Node.js, fs.rmdir(path, { recursive: true }) will be removed. Use fs.rm(path, { recursive: true }) instead
(Use `node --trace-deprecation ...` to show where the warning was created)

除了警告信息,还有一条错误信息,希望可以修复。

截图&代码:

image

前端安装环境:

如果你是启动报错,请说明你的前端环境

  • 采用的是pnpm安装还是yarn? pnpm
  • node版本号:?18.18.0
  • pnpm版本号:?9.1.3

友情提示(为了提高issue处理效率):

  • 未按格式要求发帖,会被直接删掉;
  • 请自己初判问题描述是否清楚,是否方便我们调查处理;
  • 描述过于简单或模糊,导致无法处理的,会被直接删掉;
@citynook citynook changed the title 执行 pnpm dev时,visual studio code控制台输出信息:The CJS build of Vite's Node API is deprecated,要等待近10秒才完成编译 执行 pnpm dev时,visual studio code控制台输出信息:The CJS build of Vite's Node API is deprecated,以及一条错误信息 Jun 20, 2024
@zhangdaiscott zhangdaiscott transferred this issue from another repository Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant