foreman says “unexpected EOF” in one of the SAME n

2019-09-21 08:35发布

问题:

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