在Node项目中重新编译后经常会在控制台上看到以下错误:
yanglidongdeMacBook-Pro:dist yanglidong$ nodemon --inspect server.js path.js:1149 cwd = process.cwd(); ^ Error: ENOENT: no such file or directory, uv_cwd at Error (native) at Object.resolve (path.js:1149:25) at Function.Module._resolveLookupPaths (module.js:390:17) at Function.Module._resolveFilename (module.js:460:31) at Function.Module._load (module.js:417:25) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (/usr/local/lib/node_modules/nodemon/bin/nodemon.js:3:11) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10)
仔细检查后发现代码没有问题,就是莫名其妙会有这个问题。