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 6.1 not working with PigmentCSS on NextJS #43973

Closed
Mike-Ro opened this issue Oct 3, 2024 · 4 comments
Closed

MUI 6.1 not working with PigmentCSS on NextJS #43973

Mike-Ro opened this issue Oct 3, 2024 · 4 comments
Assignees
Labels
duplicate This issue or pull request already exists package: pigment-css Specific to @pigment-css/*

Comments

@Mike-Ro
Copy link

Mike-Ro commented Oct 3, 2024

Steps to reproduce

Link to live example: https://github.com/Mike-Ro/test-muiv6.1

Steps:

  1. cd current-project-root
  2. npm install
  3. npm run dev

Current behavior

Hi everyone!

I'm trying to run a simple project, but I keep getting an error, and the compilation just stops there:

$ npm run dev

> [email protected] dev
> next dev

  ▲ Next.js 14.2.14
  - Local:        http://localhost:3000

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

Expected behavior

No response

Context

No response

Your environment

No response

Search keywords: nextjs, pigmentcss

@Mike-Ro Mike-Ro added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Oct 3, 2024
@nunesunil
Copy link

#43971 (comment)

@zannager zannager added the package: pigment-css Specific to @pigment-css/* label Oct 3, 2024
@Mike-Ro
Copy link
Author

Mike-Ro commented Oct 3, 2024

#43971 (comment)

It worked for me:

npm uninstall @babel/core
npm install @babel/[email protected]
npm dedupe

@Mike-Ro Mike-Ro closed this as completed Oct 3, 2024
@github-actions github-actions bot removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Oct 3, 2024
Copy link

github-actions bot commented Oct 3, 2024

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 @Mike-Ro! How was your experience with our support team?
We'd love to hear your thoughts in this brief Support Satisfaction survey. Your insights help us improve!

@Janpot Janpot added the duplicate This issue or pull request already exists label Oct 3, 2024
@Janpot
Copy link
Member

Janpot commented Oct 3, 2024

Duplicate of #43971

@Janpot Janpot marked this as a duplicate of #43971 Oct 3, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists package: pigment-css Specific to @pigment-css/*
Projects
None yet
Development

No branches or pull requests

5 participants