| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
mkdir /tmp/a; cd /tmp/a; rmdir /tmp/a; node -p 'module.paths' |
Sorry, something went wrong.
|
Ah ok, will write a test in a bit. |
Sorry, something went wrong.
There was a problem hiding this comment.
Can you lowercase Current Working Directory.
Sorry, something went wrong.
There was a problem hiding this comment.
Can you drop the last two dots.
Sorry, something went wrong.
There was a problem hiding this comment.
comma at the end of this line... did you mean to put a + here instead?
Sorry, something went wrong.
|
ok, looks like there's more to it than this. Something loads path during startup which explodes regardless: path.js:1163
cwd = process.cwd();
^
Error: ENOENT: no such file or directory, uv_cwd
at Object.resolve (path.js:1163:25)
at Function.Module._initPaths (module.js:642:22)
at module.js:683:8
at NativeModule.compile (bootstrap_node.js:548:7)
at Function.NativeModule.require (bootstrap_node.js:489:18)
at evalScript (bootstrap_node.js:390:33)
at run (bootstrap_node.js:121:11)
at run (bootstrap_node.js:445:7)
at startup (bootstrap_node.js:120:9)
at bootstrap_node.js:560:3
|
Sorry, something went wrong.
|
I think the solution there would probably be to overload process.cwd() entirely on load? |
Sorry, something went wrong.
|
The cwd being removed is only supported for evaluating code. Not running "normally." I added a known issue test in #12343. We could add a better message for other scenarios, or set the cwd like we do for eval script. |
Sorry, something went wrong.
If the current working directory is removed, Node cannot start normally because the module system calls uv_cwd(). Refs: nodejs#12022 PR-URL: nodejs#12343 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
|
Closing this due to a long inactivity. Please feel free to reopen if you want to follow up on this @Fishrock123 |
Sorry, something went wrong.
If the current working directory is removed, Node cannot start normally because the module system calls uv_cwd(). Refs: nodejs#12022 PR-URL: nodejs#12343 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
If the current working directory is removed, Node cannot start normally because the module system calls uv_cwd(). Backport-PR-URL: #15479 Refs: #12022 PR-URL: #12343 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
If the current working directory is removed, Node cannot start normally because the module system calls uv_cwd(). Backport-PR-URL: #15479 Refs: #12022 PR-URL: #12343 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
| Back | FazBrowse Home | New Git URL |
Checklist
Affected core subsystem(s)
bootstrap
This was added/fixed in 2c6f79c and seems like it could be quite confusing, so... maybe we should warn? ¯\_(ツ)_/¯
I don't really know how to trigger this though, so no test... for now?
cc @bnoordhuis, maybe this isn't a good idea, idk.