question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Program exits when it tries to start node

See original GitHub issue

I’m getting the following error when running dstatuspage --daemon

Initializing IPFS...
/usr/local/lib/node_modules/dstatuspage/ipfs.js:79
        this.node.start((err, ipfsapi) => {
                  ^

TypeError: Cannot read property 'start' of undefined
    at startNode (/usr/local/lib/node_modules/dstatuspage/ipfs.js:79:19)
    at node.init (/usr/local/lib/node_modules/dstatuspage/ipfs.js:95:13)
    at Object.run (/usr/local/lib/node_modules/dstatuspage/node_modules/ipfsd-ctl/src/daemon-node.js:132:16)
    at Object.f [as error] (/usr/local/lib/node_modules/dstatuspage/node_modules/once/once.js:25:25)
    at Stream.listeners.done.once (/usr/local/lib/node_modules/dstatuspage/node_modules/ipfsd-ctl/src/exec.js:38:25)
    at Stream.f (/usr/local/lib/node_modules/dstatuspage/node_modules/once/once.js:25:25)
    at emitTwo (events.js:126:13)
    at Stream.emit (events.js:214:7)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)

I’m running it under Node v8.9.4

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
paulogrcommented, Feb 5, 2018

Npm website has very clear instructions about how to handle this https://docs.npmjs.com/getting-started/fixing-npm-permissions

0reactions
100Errorscommented, Feb 4, 2018

Yes, it had issues with file permissions and I did not want to set the file permissions, so I installed it using sudo

Read more comments on GitHub >

github_iconTop Results From Across the Web

node.js: program either exits unexpectedly or just hangs
When you run it as a script and it hangs when "done", it means node still has callbacks registered waiting for events. Node...
Read more >
Let It Crash: Best Practices for Handling Node.js Errors on ...
There's one thing I want to mention here is that normally a Node. js process exits when there is no more work is...
Read more >
A strange behavior of Node.js: program exit 0 inside try{} block ...
After running the above program, it will exit immediately with the following one line output: IN TRY BLOCK. If we echo $? we...
Read more >
How to prevent your Node.js process from crashing - Medium
js process with a non-zero exit code. There are two important things here: The process doesn't crash. The process continues to work. But...
Read more >
How to Exit a Process in Node.js: process.exit() Method
Another suitable method to terminate the Node.js process is to use the process.kill() function. The process.kill is a built-in Node.js method ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found