node.js - Error: ENOENT: no such file or directory, uv_cwd

nodebot

2018-01-08T10:19:47Z||2018-01-08T10:19:47Z

完整错误提示消息是:

path.js:1175
          cwd = process.cwd();
                        ^

Error: ENOENT: no such file or directory, uv_cwd
    at Object.resolve (path.js:1175:25)
    at startup (bootstrap_node.js:175:32)
    at bootstrap_node.js:618:3

这种通常是因为你运行一个不存在的Node.js文件,比如node a.js,但是a.js不在当前目录下存在,这个异常就会抛出。