Hello World Addon Tutorial Fails to Install

I’m fairly new to Confluence development so I started with the simple hello world addon tutorial found here - https://developer.atlassian.com/cloud/confluence/getting-started/ - I followed all of the steps in the tutorial but there seems to be something missing or maybe something wrong with git repository. When I run “npm start”, I receive the following error:

Watching atlassian-connect.json for changes
Initialized memory storage adapter
Add-on server running at http://R900GH79:3000
events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: spawn ./ngrok.exe ENOENT
    at _errnoException (util.js:1022:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
    at onErrorNT (internal/child_process.js:372:16)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
    at Function.Module.runMain (module.js:686:11)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! helloworld-addon@0.0.1 start: `node app.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the helloworld-addon@0.0.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

It looks like it’s having an issue starting ngrok - are you able to run the command manually on your machine?
Something like ngrok http 3000.

Looks like I did not have ngrok(probably should be added as a step to the tutorial) but after installing ngrok I am still receiving the same error.

Hi @cody.stephens can you share how you installed ngrok? I feel like you may have not installed ngrok globally.

Additionally, have you closed your terminal window and reopened it since installing?

1 Like

I install ngrok using “npm install -g ngrok” then closed and reopened the terminal and received the same error. I then removed the confluence-helloworld-addon and followed the installation steps again. This time, I did not get the ngrok error. I received this error instead:
Failed to establish local tunnel
err = Error: panic: runtime error: invalid memory address or nil pointer dereference

I’m guessing this might have something to do with my companies network restrictions so I’m going to try again from home later on. I will let you know the outcome.

Thank you for your help.

2 Likes

Turns out I was partially right about the network restrictions, also needed admin rights to allow the add-on server to run. This resulted in me moving everything to my personal PC and it worked. Thank you again for your help.

1 Like

I don’t know if this is your problem, but I had a similar error message today and I fixed it by uninstalling Google Chrome.

  1. Uninstall Google Chrome
  2. Restart Computer
  3. Delete the “node_modules” folder from confluence-helloworld-addon.
  4. Run “npm install” in CMD. (As in Hello World instructions)
  5. Run “npm start” in CMD.

My post: