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

ERR_PACKAGE_PATH_NOT_EXPORTED #774

Open
JMTK opened this issue Mar 13, 2025 · 1 comment
Open

ERR_PACKAGE_PATH_NOT_EXPORTED #774

JMTK opened this issue Mar 13, 2025 · 1 comment

Comments

@JMTK
Copy link

JMTK commented Mar 13, 2025

I am attempting to use the revolt.js package, however I'm unable to run it in my environment due to a thrown error when resolving @solid-primitives/trigger. Not sure if it's a TypeScript stripping issue or a module resolution issue

Running:

npm install revolt.js
node --experimental-strip-types --no-warnings .\clients\revolt.ts

which is only the following file:

import { Client } from 'revolt.js';

Results in:

node:internal/modules/esm/resolve:314
  return new ERR_PACKAGE_PATH_NOT_EXPORTED(
         ^

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in C:\Users\jakem\lopez\node_modules\@solid-primitives\trigger\package.json
    at exportsNotFound (node:internal/modules/esm/resolve:314:10)
    at packageExportsResolve (node:internal/modules/esm/resolve:604:13)
    at resolveExports (node:internal/modules/cjs/loader:653:36)
    at Function._findPath (node:internal/modules/cjs/loader:742:31)
    at Function._resolveFilename (node:internal/modules/cjs/loader:1380:27)
    at defaultResolveImpl (node:internal/modules/cjs/loader:1050:19)
    at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1055:22)
    at Function._load (node:internal/modules/cjs/loader:1204:37)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:234:24) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}

I do see the exports section in the trigger package.json, not sure where the disconnect is:
https://github.com/solidjs-community/solid-primitives/blob/b31be823c12de2a5729ee2d1f4cf1bcf47e66e3d/packages/trigger/package.json#L34C1-L40C5

Environment info:

  • I am using "type": "module" in my package.json file
  • Node version: 23.7.0
  • TypeScript version: 5.8.2
  • @solid-primitives/trigger version: 1.2.0
npm why @solid-primitives/trigger 

@solid-primitives/[email protected] dev
node_modules/@solid-primitives/trigger
  @solid-primitives/trigger@"^1.0.11" from @solid-primitives/[email protected]
  node_modules/@solid-primitives/set
    @solid-primitives/set@"^0.4.11" from [email protected]
    node_modules/revolt.js
      dev revolt.js@"^7.0.5" from the root project
  @solid-primitives/trigger@"^1.1.0" from @solid-primitives/[email protected]
  node_modules/@solid-primitives/map
    @solid-primitives/map@"^0.4.11" from [email protected]
    node_modules/revolt.js
      dev revolt.js@"^7.0.5" from the root project
@fb-sean
Copy link

fb-sean commented Apr 5, 2025

Noticed this issue too xd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants