foreman says “unexpected EOF” in one of the SAME node app in 2 different places

时光毁灭记忆、已成空白 提交于 2019-12-13 09:35:45

问题


i have a sample node.js app in directoryA. Then i did foreman start in that directory and it worked fine.

afterwords i copied that app into a new location and tried doing foreman start from there, it didn't work... here is what i did:

$ ########## foreman works fine in directoryA ##########
$ pwd
you/cant/see/me/directoryA
$ foreman start
22:28:30 web.1  | started with pid 80332
22:28:30 web.1  | Listening on 5000
^C

$ ########## copy the same node app from directoryA to directoryB ##########
$ cd ..
$ cp -r ./directoryA ./directoryB
$ cd directoryB

$ ########## foreman doesn't work in directoryB ##########
$ pwd
you/cant/see/me/directoryB
$ foreman start
22:27:28 web.1  | started with pid 80323
22:27:28 web.1  | sh: -c: line 0: unexpected EOF while looking for matching `''
22:27:28 web.1  | sh: -c: line 1: syntax error: unexpected end of file
22:27:28 web.1  | exited with code 2
22:27:28 system | sending SIGTERM to all processes
SIGTERM received

it's the same damn app... it's a simple helloworld express.js app as showed in https://devcenter.heroku.com/articles/getting-started-with-nodejs.

What am i doing wrong here?


回答1:


I was getting the same error. It turns out my path included the file Alex's Projects . Foreman choke and died on the apostrophe in Alex's. I renamed the folder to Alex Projects and it worked AOK. I found the answer to this here.

https://github.com/ddollar/foreman/issues/315



来源:https://stackoverflow.com/questions/20270987/foreman-says-unexpected-eof-in-one-of-the-same-node-app-in-2-different-places

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!