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

package.json imports fails after build but works in dev #8977

Open
vvaibhavv11 opened this issue Mar 19, 2025 · 0 comments
Open

package.json imports fails after build but works in dev #8977

vvaibhavv11 opened this issue Mar 19, 2025 · 0 comments

Comments

@vvaibhavv11
Copy link

depency thta uses teh package imports like this

  "imports": {
    "#crypto": {
      "node": "./lib/crypto-node.js",
      "default": "./lib/crypto-native.js"
    }

fails to run after the build and gives the following error

A JavaScript error occurred in the main process
Uncaught Exception:
TypeError [ERR_PACKAGE_IMPORT_NOT_DEFINED]: Package import specifier "#crypto" is not defined imported from /tmp/.mount_ai-locezUW7p/resources/app.asar/node_modules/universal-github-app-jwt/lib/get-token.js
    at importNotDefined (node:internal/modules/esm/resolve:305:10)
    at packageImportsResolve (node:internal/modules/esm/resolve:755:9)
    at moduleResolve (node:internal/modules/esm/resolve:854:16)
    at defaultResolve (node:internal/modules/esm/resolve:994:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:685:12)
    at #cachedDefaultResolve (node:internal/modules/esm/loader:634:25)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:617:38)
    at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:273:38)
    at ModuleJob._link (node:internal/modules/esm/module_job:135:49)

is there some way to fix this this happen before with different package and i patch the package and use it but when i build and use again it happen again with this one.

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

1 participant