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

[vite] The CJS build of Vite's Node API is deprecated #67

Open
oliviertassinari opened this issue May 9, 2024 · 3 comments
Open

[vite] The CJS build of Vite's Node API is deprecated #67

oliviertassinari opened this issue May 9, 2024 · 3 comments
Assignees
Labels
bug 🐛 Something doesn't work status: waiting for maintainer These issues haven't been looked at yet by a maintainer vite

Comments

@oliviertassinari
Copy link
Member

oliviertassinari commented May 9, 2024

Steps to reproduce

  1. Start
  2. See the console

Current behavior

SCR-20240510-biuf

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.

Expected behavior

No warning.

Context

The warning goes away if I remove Pigment CSS from the vite config, but then, I'm not using Pigment CSS anymore 🙃

diff --git a/vite.config.js b/vite.config.js
index 78b5110..b39ba6c 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -1,6 +1,5 @@
 import { defineConfig } from 'vite';
 import react from '@vitejs/plugin-react';
-import { pigment, extendTheme } from '@pigment-css/vite-plugin';

 // To learn more about theming, visit https://github.com/mui/material-ui/blob/master/packages/zero-runtime/README.md#theming
 const theme = extendTheme({

Your environment

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Search keywords: -

@oliviertassinari oliviertassinari added status: waiting for maintainer These issues haven't been looked at yet by a maintainer bug 🐛 Something doesn't work labels May 9, 2024
@oliviertassinari oliviertassinari changed the title [vite] The CJS build of Vite's Node API is deprecated. [vite] The CJS build of Vite's Node API is deprecated May 9, 2024
@klingat

This comment was marked as duplicate.

@iM-GeeKy
Copy link

iM-GeeKy commented Aug 27, 2024

@brijeshb42 @oliviertassinari Did you find a solution to this?

@steveliles
Copy link

steveliles commented Oct 7, 2024

"Pigment CSS depends on some of the @mui/* packages internally. We'll be moving away from that which would automatically fix this."

#232 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work status: waiting for maintainer These issues haven't been looked at yet by a maintainer vite
Projects
None yet
Development

No branches or pull requests

5 participants