Tag Archives: Cannot find module

Error: ENOENT: no such file or directory, uv_cwd Error: Cannot find module

Error: ENOENT: no such file or directory, uv_cwd Error: Cannot find module

new project was deployed to huawei cloud, which is a service provided by express. When it was started with pm2, an error was reported:



initially thought it was express installation error:

Error: Cannot find module 'express'

So multiple installations, various attempts, but it doesn’t work, or even reinstall Node.
later I found that it was fine to start directly with node, so it was fine when I started only one process with pm2. It’s so strange that I started ten projects and didn’t find this kind of problem.
And then I set my sights on

Error: ENOENT: no such file or directory, uv_cwd

The answer, at last, is simply to restart THE PM2

pm2 kill


and then start again:

and then it’s ok to leave work.