No respect for watch.json, fails to auto-start


#1

Hello, when the application tries to autostart, I get this error even without having a watch.json file.

SyntaxError: Unexpected end of JSON input
at JSON.parse ()
at /etc/service/watcher/source/app-picker.js:107:37
at ChildProcess.exithandler (child_process.js:267:7)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)

I also tried creating a watch.json file that stops the application from auto-refreshing (from the support thread) and still got the same message. Running npm start, however, runs application normally.


#2

It’s not clear to me from this snippet where it’s picking up the malformed JSON. Let us know the project name and we’ll take a look. If your project is private, either make it public temporarily or DM me a join link so we can view the code. Thanks.


#3

Your project was getting confused because you have both a requirements.txt and a package.json file in the same project. I’ve renamed requirements.txt to requirements1.txt, which effectively disables it and your project is now working. If you want to use Python as well as Node.js, create a separate project for Python.