-
Notifications
You must be signed in to change notification settings - Fork 16
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
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './log.js' is not defined by "exports" #28
Comments
Will be looking into this bug soon. Thanks for reporting this error 👍 |
This issue occurs due to my new implementation of not download reejs own dependencies via npm, instead downloading it via URL imports. |
As for you, you can delete |
Hey @schlichtanders, could you please try creating a new project with the latest Reejs version v0.20 to see if error still occurs? If it doesn't lmk, and I'll close this issue :) |
I can confirm - |
could u try |
|
Ah that's one of the other issues that we have. After starting packit in dev mode, type |
Normally that error occurs if there's two or more slashes together in any import statement. > await import("//hm/ok.js")
Uncaught:
TypeError [ERR_INVALID_FILE_URL_HOST]: File URL host must be "localhost" or empty on linux
at getPathFromURLPosix (node:internal/url:1447:11)
at fileURLToPath (node:internal/url:1470:50)
at finalizeResolution (node:internal/modules/esm/resolve:245:12)
at moduleResolve (node:internal/modules/esm/resolve:924:10)
at defaultResolve (node:internal/modules/esm/resolve:1148:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:390:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:359:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:234:38)
at ModuleLoader.import (node:internal/modules/esm/loader:322:34) {
code: 'ERR_INVALID_FILE_URL_HOST',
input: 'file://hm/ok.js',
module: 'file:///home/ren/repl'
}
> await import("/hm/ok.js")
Uncaught:
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/hm/ok.js' imported from /home/ren/repl
at finalizeResolution (node:internal/modules/esm/resolve:264:11)
at moduleResolve (node:internal/modules/esm/resolve:924:10)
at defaultResolve (node:internal/modules/esm/resolve:1148:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:390:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:359:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:234:38)
at ModuleLoader.import (node:internal/modules/esm/loader:322:34)
at importModuleDynamically (node:repl:466:39)
at importModuleDynamicallyWrapper (node:internal/vm/module:431:21) {
code: 'ERR_MODULE_NOT_FOUND',
url: 'file:///hm/ok.js'
} Ree.js isn't foolproof - sometimes halfway downloaded/failed dependencies maybe forwarded back to packit - which would generate similar invalid import statements. The worst part is trying to debug it - nodejs didnt provide anything useful till this point: nodejs/node#49571 It was fixed in this PR in nodejs: nodejs/node#49571 |
Thank you for all your help. I am off to defining import maps myself manually (I also have difficulties with jspm ;-) ), and don't have further time to try with reejs |
Describe the bug
I just wanted to try out reejs on npm and it fails to build its own initialization.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The package should be buildable after init, or the error should at least be understandable.
Desktop (please complete the following information):
$ reejs doctor [reejs] Doctor [RUNTIME] node [VERSION] 0.17.0 [NODE_VER] 20.11.1 [REEJS_CACHE] 0 files [REEJS_DIR] /home/[REDACTED]/.npm-packages/lib/node_modules/reejs/.reejs , /home/[REDACTED]/.julia/dev/tmp/esm-test/esm-test/.reejs [REEJS_DIR_EXISTS] false [PWD] /home/[REDACTED]/esm-test [USER_AGENT] Node/v20.11.1 (reejs/0.17.0)
The text was updated successfully, but these errors were encountered: