Repository navigation
Exception on startup if $PWD is deleted #1184
Description
Activity
What iojs version and what platform are you on?
- addedconfirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.
on Mar 18, 2015 Don't think it is a bug. This happens when cwd is removed
Reacted by Rajni KumariReacted by Andreas Donig@vkurchatkin Removed?
steps to reproduce:
(from term 1) $ mkdir somedir $ cd somedir (from term 2) $ rmdir somedir (from term 1) $ iojs node.js:771 var cwd = process.cwd(); ^ Error: ENOENT: no such file or directory, uv_cwd at Error (native) at Function.startup.resolveArgv0 (node.js:771:23) at startup (node.js:46:13) at node.js:865:3- removedconfirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.
on Mar 18, 2015 Isn't a bug, the folder was removed from another process and
cwddoesn't exist as @vkurchatkin said@matrixdevuk executing
iojswill open the REPL not the helpI'm going to reopen this and take a look. Throwing an error seems like a bad user experience.
- changed the title
[-]Some weird error.[/-][+]Exception on startup if $PWD is deleted[/+]on Mar 18, 2015 2 remaining items
Fixed in c15e81a...2b2e48a.
I've just seen an exact same error with Node.js 4.1.2.
Can you file a new issue with steps on how to reproduce it? Do the regression tests from c15e81a...2b2e48a work for you locally?
The test/parallel/test-cwd-enoent.js test works fine for me.
I'll look into preparing an isolated test case.
@mzgol FYI today I experimented this same issue on node v4.2.2 and it was because I was running a script inside of an autogenerated directory which didn't exist anymore (or it was deleted and created again meanwhile, so it fails even if they exists under the same name, I guess it's maybe because of the i-node pointers).
A classic example will be to execute a script under your babel compiled source, etc.
A quick way to solve it is to go out to an existing directory and go back there.Strange had a similar problem restarted and problem is solved.
I am getting this issue in the following scenario:
- Running My node App
- doing a gulp build which outputs to a build directory
- trying to run the built node app while the the src node app is running
$ node -v
v5.5.0I just had this issue when I deleted then git cloned a director, and ran the script.
No idea what any of this means besides "no such file or directory"; hopefully you experienced Node/IO devs will know what this means.