Hello World Addin fails at step - "npm start"

I got through “npm install”. I setup the credentials.json file.

I think Node.js is setup properly, if I run “node” in CMD it opens and I can use it.

I got the following running “npm start”:

helloworld-addon@0.0.1 start C:\Users\Ron\Documents\Visual Studio 2015\Projects\Confluence\confluence-helloworld-addon
node app.js

Watching atlassian-connect.json for changes
Initialized memory storage adapter
Add-on server running at http://DESKTOP-H6PGQJ1: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.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Ron\AppData\Roaming\npm-cache_logs\2018-02-15T01_23_57_045Z-debug.log

I tried to follow this:

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.

I am able to run “ngrok http 3000”

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.

I have admin rights on this PC, I also tried running CMD as admin.

This was very frustrating. I figured out how to solve the problem, I hope this get’s fixed soon. I imagine this will be a problem for many people…

Search “events.js:183” you will see there is a problem with Google Chrome (recent versions).

  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.

Further reading:

1 Like