且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何解决Nodejs:错误:ENOENT:没有这样的文件或目录

更新时间:2023-02-22 20:50:48

您的应用程序希望在 /home/embah/node/nodeapp/config/config.json 找到一个文件,但该文件不存在(这就是 ENOENT 的意思).因此,您要么需要创建预期的目录结构,要么配置您的应用程序,使其在 config.json 的正确目录中查找.

Your app is expecting to find a file at /home/embah/node/nodeapp/config/config.json but that file does not exist (which is what ENOENT means). So you either need to create the expected directory structure or else configure your application such that it looks in the correct directory for config.json.