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

FATAL No "exports" main defined in unicorn-magic\package.json #954

Closed
OsamaAlmamri opened this issue Feb 10, 2025 · 7 comments
Closed

FATAL No "exports" main defined in unicorn-magic\package.json #954

OsamaAlmamri opened this issue Feb 10, 2025 · 7 comments
Labels
bug Something isn't working

Comments

@OsamaAlmamri
Copy link

Environment

in dev and prod

Reproduction

No response

Describe the bug

the problem just from yesterday , , It was work in last year , but now i get this error

╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ ✖ Nuxt Fatal Error │
│ │
│ Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in node_modules\unicorn-magic\package.json │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

i search where this package used , it's in this package used
"dependencies": {
"@nuxt/kit": "^3.13.2",

and @nuxt/kit use
"globby": "^14.0.2",

and globby use "unicorn-magic": "^0.1.0"

after i remove @nuxtjs/tailwindcss from modules
modules: [

"@nuxtjs/tailwindcss",

npm run dev work again

Additional context

No response

Logs

@OsamaAlmamri OsamaAlmamri added the bug Something isn't working label Feb 10, 2025
@panoscyber
Copy link

same thing. Locking module to specific version worked for me: "@nuxtjs/tailwindcss": "6.11.4"

@ineshbose
Copy link
Collaborator

Are you using Nuxt 2? I think I'll need a reproduction please 🙏

@OsamaAlmamri
Copy link
Author

Are you using Nuxt 2? I think I'll need a reproduction please 🙏

Yes, in Nuxt2

@yuelongh
Copy link

yuelongh commented Mar 13, 2025

I am also seeing this error when using

"@nuxtjs/tailwindcss": "6.13.2",
"nuxt": "3.16.0",

Pre-transform error: [postcss] No "exports" main defined in xxxx/node_modules/unicorn-magic/package.json
Plugin: vite:css
File: xxxx/app/assets/css/tailwind.css:undefined:NaN

but it doesn't happen in 6.13.1 or below

@nick-nds
Copy link

Same issue when trying to use @nuxtjs/tailwindcss@6 with nuxt 2

@ineshbose
Copy link
Collaborator

OK - I've oddly hit the same issue in my Nuxt 3 project now. Let me investigate 👍

@ineshbose
Copy link
Collaborator

Some related issues: nuxt/vercel-builder#850, sindresorhus/globby#260

Unfortunately I can't quite fix this within the module scope, it is likely to be an upstream issue somewhere (tailwindcss / @nuxt/kit > globby > [email protected]).

I can ask you to pin unicorn-magic to 0.1.0 or 0.2.0 using your dependency manager.

@ineshbose ineshbose closed this as not planned Won't fix, can't repro, duplicate, stale Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants