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

No "exports" main defined in .../node_modules/c12/package.json #232

Closed
ericktreichel opened this issue Feb 21, 2025 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@ericktreichel
Copy link

Environment

"nuxt": "3.15.4",
"@nuxt/cli": "3.22.2",
"c12": "^2.0.2" and/or "c12": "^2.0.3",
node: 20.18.1
Windows 11 with WSL2 running Ubuntu 24.04

Reproduction

clear the cache with yarn cache clean, then try to install nuxt 3.15.4, it will try to install @nuxt/cli 3.22.2 that requires c12 2.02.
The error should appear after doing that.

Describe the bug

Hi,

When reinstalling my packages Nuxt is installing the new @nuxt/cli 3.22.2 that requires c12 2.02.
When installing my packages using NPM it exists with code 1 with this message:

ERROR No "exports" main defined in /home/trchl/DocumentsWSL2/ADXMAIL_ALL/nuxt3-front-ADXMAIL/node_modules/c12/package.json 11:50:54 AM

at exportsNotFound (node:internal/modules/esm/resolve:304:10)
at packageExportsResolve (node:internal/modules/esm/resolve:594:13)
at resolveExports (node:internal/modules/cjs/loader:634:36)
at Module._findPath (node:internal/modules/cjs/loader:724:31)
at Module._resolveFilename (node:internal/modules/cjs/loader:1211:27)
at Function.resolve (node:internal/modules/helpers:190:19)
at jitiResolve (node_modules/jiti/dist/jiti.cjs:1:187220)
at jitiRequire (node_modules/jiti/dist/jiti.cjs:1:189288)
at import (node_modules/jiti/dist/jiti.cjs:1:199778)
at node_modules/@nuxt/kit/dist/index.mjs:18:16
at async Function.import (node_modules/jiti/dist/jiti.cjs:1:199772)
at async loadKit (node_modules/@nuxt/cli/dist/shared/cli.DlcAx0De.mjs:8:15)
at async Object.run (node_modules/@nuxt/cli/dist/chunks/prepare.mjs:30:49)
at async runCommand (node_modules/citty/dist/index.mjs:316:16)
at async runCommand (node_modules/citty/dist/index.mjs:307:11)
at async runMain (node_modules/citty/dist/index.mjs:445:7)

ERROR No "exports" main defined in /home/trchl/DocumentsWSL2/ADXMAIL_ALL/nuxt3-front-ADXMAIL/node_modules/c12/package.json 11:50:54 AM

error Command failed with exit code 1.

Additional context

No response

Logs

ERROR  No "exports" main defined in /home/trchl/DocumentsWSL2/ADXMAIL_ALL/nuxt3-front-ADXMAIL/node_modules/c12/package.json                  11:50:54 AM

    at exportsNotFound (node:internal/modules/esm/resolve:304:10)
    at packageExportsResolve (node:internal/modules/esm/resolve:594:13)
    at resolveExports (node:internal/modules/cjs/loader:634:36)
    at Module._findPath (node:internal/modules/cjs/loader:724:31)
    at Module._resolveFilename (node:internal/modules/cjs/loader:1211:27)
    at Function.resolve (node:internal/modules/helpers:190:19)
    at jitiResolve (node_modules/jiti/dist/jiti.cjs:1:187220)
    at jitiRequire (node_modules/jiti/dist/jiti.cjs:1:189288)
    at import (node_modules/jiti/dist/jiti.cjs:1:199778)
    at node_modules/@nuxt/kit/dist/index.mjs:18:16
    at async Function.import (node_modules/jiti/dist/jiti.cjs:1:199772)
    at async loadKit (node_modules/@nuxt/cli/dist/shared/cli.DlcAx0De.mjs:8:15)
    at async Object.run (node_modules/@nuxt/cli/dist/chunks/prepare.mjs:30:49)
    at async runCommand (node_modules/citty/dist/index.mjs:316:16)
    at async runCommand (node_modules/citty/dist/index.mjs:307:11)
    at async runMain (node_modules/citty/dist/index.mjs:445:7)



 ERROR  No "exports" main defined in /home/trchl/DocumentsWSL2/ADXMAIL_ALL/nuxt3-front-ADXMAIL/node_modules/c12/package.json                  11:50:54 AM

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
@pi0
Copy link
Member

pi0 commented Feb 21, 2025

thanks for report should be fixed in 2.0.4

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

2 participants