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

MUI not working with Pigment Css #43971

Closed
nunesunil opened this issue Oct 2, 2024 · 4 comments
Closed

MUI not working with Pigment Css #43971

nunesunil opened this issue Oct 2, 2024 · 4 comments
Assignees
Labels
package: pigment-css Specific to @pigment-css/* regression A bug, but worse

Comments

@nunesunil
Copy link

nunesunil commented Oct 2, 2024

Steps to reproduce

clone https://github.com/nunesunil/mui-pigmentCss

Current behavior

gives the error -

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received an instance of Object at Object.isAbsolute (node:path:1188:5) at standardizeName (/Users/sunil/Desktop/mui-pigmentCss/node_modules/.pnpm/@[email protected]/node_modules/@babel/core/lib/config/files/plugins.js:76:15) at resolveAlternativesHelper (/Users/sunil/Desktop/mui-pigmentCss/node_modules/.pnpm/@[email protected]/node_modules/@babel/core/lib/config/files/plugins.js:81:28) at resolveAlternativesHelper.next (<anonymous>) at resolveStandardizedNameForRequire (/Users/sunil/Desktop/mui-pigmentCss/node_modules/.pnpm/@[email protected]/node_modules/@babel/core/lib/config/files/plugins.js:159:16) at resolveStandardizedName (/Users/sunil/Desktop/mui-pigmentCss/node_modules/.pnpm/@[email protected]/node_modules/@babel/core/lib/config/files/plugins.js:182:12) at /Users/sunil/Desktop/mui-pigmentCss/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/babel-merge/src/index.js:14:24 at Array.find (<anonymous>) at /Users/sunil/Desktop/mui-pigmentCss/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/babel-merge/src/index.js:13:28 at Array.reduce (<anonymous>) at mergeArray (/Users/sunil/Desktop/mui-pigmentCss/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/babel-merge/src/index.js:10:36) at babelMerge (/Users/sunil/Desktop/mui-pigmentCss/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/babel-merge/src/index.js:34:19) at merge (/Users/sunil/Desktop/mui-pigmentCss/node_modules/.pnpm/@[email protected][email protected]/node_modules/@wyw-in-js/transform/lib/options/buildOptions.js:22:42) at Array.reduce (<anonymous>) at buildOptions (/Users/sunil/Desktop/mui-pigmentCss/node_modules/.pnpm/@[email protected][email protected]/node_modules/@wyw-in-js/transform/lib/options/buildOptions.js:33:95) at buildConfigs (/Users/sunil/Desktop/mui-pigmentCss/node_modules/.pnpm/@[email protected][email protected]/node_modules/@wyw-in-js/transform/lib/transform/Entrypoint.helpers.js:68:52) at Object.loadAndParse [as loadAndParseFn] (/Users/sunil/Desktop/mui-pigmentCss/node_modules/.pnpm/@[email protected][email protected]/node_modules/@wyw-in-js/transform/lib/transform/Entrypoint.helpers.js:128:7) at new Entrypoint (/Users/sunil/Desktop/mui-pigmentCss/node_modules/.pnpm/@[email protected][email protected]/node_modules/@wyw-in-js/transform/lib/transform/Entrypoint.js:40:112) at Entrypoint.innerCreate (/Users/sunil/Desktop/mui-pigmentCss/node_modules/.pnpm/@[email protected][email protected]/node_modules/@wyw-in-js/transform/lib/transform/Entrypoint.js:129:27) at /Users/sunil/Desktop/mui-pigmentCss/node_modules/.pnpm/@[email protected][email protected]/node_modules/@wyw-in-js/transform/lib/transform/Entrypoint.js:85:47 at EventEmitter.perf (/Users/sunil/Desktop/mui-pigmentCss/node_modules/.pnpm/@[email protected][email protected]/node_modules/@wyw-in-js/transform/lib/utils/EventEmitter.js:45:20) at Entrypoint.create (/Users/sunil/Desktop/mui-pigmentCss/node_modules/.pnpm/@[email protected][email protected]/node_modules/@wyw-in-js/transform/lib/transform/Entrypoint.js:84:25) at Entrypoint.createRoot (/Users/sunil/Desktop/mui-pigmentCss/node_modules/.pnpm/@[email protected][email protected]/node_modules/@wyw-in-js/transform/lib/transform/Entrypoint.js:62:32) at Object.transform (/Users/sunil/Desktop/mui-pigmentCss/node_modules/.pnpm/@[email protected][email protected]/node_modules/@wyw-in-js/transform/lib/transform.js:98:45) at Object.transform (/Users/sunil/Desktop/mui-pigmentCss/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]/node_modules/@pigment-css/unplugin/build/index.js:268:40) at Object.transform (/Users/sunil/Desktop/mui-pigmentCss/node_modules/.pnpm/[email protected]/node_modules/unplugin/dist/webpack/loaders/transform.js:120:38) at LOADER_EXECUTION (/Users/sunil/Desktop/mui-pigmentCss/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:4134) at runSyncOrAsync (/Users/sunil/Desktop/mui-pigmentCss/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:4145) at iterateNormalLoaders (/Users/sunil/Desktop/mui-pigmentCss/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:5782) at iterateNormalLoaders (/Users/sunil/Desktop/mui-pigmentCss/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:5650) at /Users/sunil/Desktop/mui-pigmentCss/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:5879 at r.callback (/Users/sunil/Desktop/mui-pigmentCss/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:4039) at Object.transform (/Users/sunil/Desktop/mui-pigmentCss/node_modules/.pnpm/[email protected]/node_modules/unplugin/dist/webpack/loaders/transform.js:135:5)

Expected behavior

No response

Context

No response

Your environment

npx @mui/envinfo

System:
OS: macOS 15.0
Binaries:
Node: 20.17.0 - /usr/local/bin/node
npm: 10.8.2 - /usr/local/bin/npm
pnpm: 9.12.0 - ~/Library/pnpm/pnpm
Browsers:
Chrome: 129.0.6668.71
Edge: Not Found
Safari: 18.0
npmPackages:
@mui/material: ^6 => 6.1.2
@mui/material-pigment-css: ^6 => 6.1.2
@pigment-css/nextjs-plugin: ^0 => 0.0.24
@types/react: ^18 => 18.3.11
react: ^18 => 18.3.1
react-dom: ^18 => 18.3.1
typescript: ^5 => 5.6.2

Search keywords: Pigment css, dependencies, nextjs, pigmentcss

@nunesunil nunesunil added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Oct 2, 2024
@mnajdova mnajdova self-assigned this Oct 3, 2024
@mnajdova
Copy link
Member

mnajdova commented Oct 3, 2024

Thanks for the report, I can confirm that also the current example we have is broken. cc @brijeshb42

@Janpot
Copy link
Member

Janpot commented Oct 3, 2024

Looks like this is caused by yesterday's @babel/core update, seems like it can be fixed for now by installing @babel/[email protected]. That seems to be enough to deduplicate @babel/core to a working version.

pnpm add @babel/[email protected] && pnpm dedupe

Alternatively you could add it to resolutions. We'll start working on a durable fix.

@Janpot Janpot added regression A bug, but worse and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Oct 3, 2024
@DiegoAndai DiegoAndai moved this to Backlog in Material UI Oct 14, 2024
@DiegoAndai DiegoAndai moved this from Backlog to Selected in Material UI Oct 14, 2024
@mnajdova
Copy link
Member

The issue has been resolved in the v7.25.8 of @babel/core, as the team decided to backport the old API for resolvePreset and resolvePreset in babel/babel#16888. Long term, the code in wyw could be update to adhear to the new API. cc @brijeshb42

@github-project-automation github-project-automation bot moved this from Selected to Done in Material UI Oct 16, 2024
Copy link

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

@nunesunil How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: pigment-css Specific to @pigment-css/* regression A bug, but worse
Projects
Status: Done
Development

No branches or pull requests

4 participants