Skip to content

Exception on startup if $PWD is deleted #1184

Description

$ 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

No idea what any of this means besides "no such file or directory"; hopefully you experienced Node/IO devs will know what this means.

Activity

  1. mscdex commented on Mar 18, 2015

    @mscdex
    Contributor

    What iojs version and what platform are you on?

  2. vkurchatkin commented on Mar 18, 2015

    @vkurchatkin
    Contributor

    Don't think it is a bug. This happens when cwd is removed

  3. mscdex commented on Mar 18, 2015

    @mscdex
    Contributor

    @vkurchatkin Removed?

  4. julianduque commented on Mar 18, 2015

    @julianduque
    Contributor

    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
    
  5. julianduque commented on Mar 18, 2015

    @julianduque
    Contributor

    Isn't a bug, the folder was removed from another process and cwd doesn't exist as @vkurchatkin said

  6. julianduque commented on Mar 18, 2015

    @julianduque
    Contributor

    @matrixdevuk executing iojs will open the REPL not the help

  7. bnoordhuis commented on Mar 18, 2015

    @bnoordhuis
    Member

    I'm going to reopen this and take a look. Throwing an error seems like a bad user experience.

  8. changed the title [-]Some weird error.[/-] [+]Exception on startup if $PWD is deleted[/+] on Mar 18, 2015
  9. 2 remaining items

  10. bnoordhuis commented on Mar 19, 2015

    @bnoordhuis
    Member
  11. mgol commented on Oct 12, 2015

    @mgol
    Contributor

    I've just seen an exact same error with Node.js 4.1.2.

  12. bnoordhuis commented on Oct 12, 2015

    @bnoordhuis
    Member

    Can you file a new issue with steps on how to reproduce it? Do the regression tests from c15e81a...2b2e48a work for you locally?

  13. mgol commented on Oct 12, 2015

    @mgol
    Contributor

    The test/parallel/test-cwd-enoent.js test works fine for me.

    I'll look into preparing an isolated test case.

  14. nicosommi commented on Nov 17, 2015

    @nicosommi

    @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.

  15. amadeobrands commented on Feb 24, 2016

    @amadeobrands

    Strange had a similar problem restarted and problem is solved.

  16. pickworth commented on Mar 17, 2016

    @pickworth

    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.0

  17. ramonGonzEdu commented on Sep 2, 2021

    @ramonGonzEdu

    I just had this issue when I deleted then git cloned a director, and ran the script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions