NODE JS - 你能告诉我目录顺序做错了什么吗?
我对 Node JS 非常陌生,之前我能够运行这个 js 文件。现在,我不能,我也不知道为什么。它说它在 config 文件夹下看不到 app.js 文件,但正如你所看到的,config 下有 app.js,我还在 server.js 中给出了指示。请帮帮我。
I am super new to Node JS and I was able to run this js file before. Right now, I can't and I don't know why. It says that it doesn't see app.js file under the config folder but as you see there is app.js under the config and I also gave direction in server.js. Please help me out.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您要导入 app.js 文件,最好像这样在末尾添加 .js
if you are importing app.js file its a good idea to add .js at the end just like this
当您的 server.js 文件与
server
目录位于同一级别时,您正在使用..
。使用一个.
就可以了You are using
..
when your server.js file is at the same level as theserver
directory. Use one.
and it should work