typicode / hotel

🏩 A simple process manager for developers. Start apps from your browser and access them using local domains
MIT License
9.98k stars 422 forks source link

hotel undefined:1 SyntaxError: Unexpected end of JSON input #319

Closed twigs67 closed 6 years ago

twigs67 commented 6 years ago

I'm not sure if this is an issue with hotel, as it worked on my first install, but it is no longer working for me. Whenever I type in a hotel command, it produces this error:

MacBook-Pro:~ user$ hotel
undefined:1

SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at Object.<anonymous> (/usr/local/lib/node_modules/hotel/lib/conf.js:31:19)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/hotel/lib/cli/daemon.js:8:14)

It's the only npm package that is doing this. I've uninstalled hotel and uninstalled npm entirely, but the problem still persists. I've googled, but haven't found anything.

I was hoping someone might know what the issue may be.

Thanks

npm 6.4.1 node v8.12.0 hotel: 0.8.7

j-f1 commented 6 years ago

Are any of the JSON files in ~/.hotel formatted incorrectly?

twigs67 commented 6 years ago

@j-f1 - embarrassed to say that I didn't even check there. That fixed it. Many thanks