Closed Morabotti closed 2 months ago
Thanks for the report. I am updating all examples in https://github.com/mui/material-ui/pull/43494 to use the latest
tag instead of next
. Using these versions the project runs successfully. These are the versions I ended up with:
System:
OS: macOS 14.1.2
Binaries:
Node: 20.15.0 - ~/.nvm/versions/node/v20.15.0/bin/node
npm: 10.7.0 - ~/.nvm/versions/node/v20.15.0/bin/npm
pnpm: 9.7.1 - ~/.nvm/versions/node/v20.15.0/bin/pnpm
Browsers:
Chrome: 128.0.6613.85
Edge: Not Found
Safari: 17.1.2
npmPackages:
@emotion/react: 11.13.3
@emotion/styled: 11.13.0
@mui/core-downloads-tracker: 6.0.0
@mui/material: latest => 6.0.0
@mui/material-pigment-css: latest => 6.0.0
@mui/private-theming: 6.0.0
@mui/styled-engine: 6.0.0
@mui/system: 6.0.0
@mui/types: 7.2.16
@mui/utils: 6.0.0
@pigment-css/react: 0.0.20
@pigment-css/vite-plugin: latest => 0.0.20
@types/react: latest => 18.3.4
react: latest => 18.3.1
react-dom: latest => 18.3.1
typescript: latest => 5.5.4
Can you verify that it works when using the latest
tag for all @mui/* dependencies?
That does not fix the issue for me. Tested with npm run dev
and npm run build && npm run preview
. Same problem:
System:
OS: Windows 11 10.0.22631
Binaries:
Node: 20.14.0 - C:\Program Files\nodejs\node.EXE
npm: 10.7.0 - C:\Program Files\nodejs\npm.CMD
pnpm: Not Found
Browsers:
Chrome: Not Found
Edge: Chromium (127.0.2651.74)
npmPackages:
@emotion/react: 11.13.3
@emotion/styled: 11.13.0
@mui/core-downloads-tracker: 6.0.0
@mui/material: latest => 6.0.0
@mui/material-pigment-css: latest => 6.0.0
@mui/private-theming: 6.0.0
@mui/styled-engine: 6.0.0
@mui/system: 6.0.0
@mui/types: 7.2.16
@mui/utils: 6.0.0
@pigment-css/react: 0.0.20
@pigment-css/vite-plugin: latest => 0.0.20
@types/react: latest => 18.3.4
react: latest => 18.3.1
react-dom: latest => 18.3.1
typescript: latest => 5.5.4
Note that the npm run build
does not work out of the box either because of the tsc check. It results the following "error":
> tsc -b
src/App.tsx:1:1 - error TS6133: 'React' is declared but its value is never read.
1 import * as React from 'react';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Found 1 error.
Can you please share your repo? Or just create a GitHub repository as a minimal reproduction.
I noticed the TS error, we can fix it separately.
This is basically a duplicate from the example project. Steps to reproduce:
npm install
npm run dev
I've reproduced this on two machines, Windows 10 and Windows 11. Only tested with npm and Node 20.
I was testing on MacOS, sorry. I was able to reproduce on Windows. We'll look into it.
Let me check this on a Windows machine if I can find it. We recently fixed this issue in general (atleast I thought I did). So seems related to that except some OS specific thing that needs to be handled as well.
@Morabotti the issue has been fixed in https://github.com/mui/pigment-css/pull/218, it will be released in "0.0.22" (both for the vite and nextjs plugins). If you want to try it locally before it, you can use this package version:
{
"@pigment-css/vite-plugin": "https://pkg.csb.dev/mui/pigment-css/commit/9462e64b/@pigment-css/vite-plugin"
}
This fixed the issue. Thanks.
This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue. Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.
[!NOTE] We value your feedback @Morabotti! How was your experience with our support team? If you could spare a moment, we'd love to hear your thoughts in this brief Support Satisfaction survey. Your insights help us improve!
Steps to reproduce
Link to live example: /examples/material-ui-pigment-css-vite-ts
Steps:
npm run dev
:Current behavior
Not working
Expected behavior
Things to work
Context
No response
Your environment
Environment
Search keywords: vite, pigment-css