Create add-on project

I am quite new to atlassian and jira. Just started my learning process, while I was looking to create and deploy a simple add-on using atlassian-connect-express tool I was stuck at installing dependencies for the project. A whole bunch of errors showed and all the dependencies were not downloaded. I followed instruction as per the document here

The npm-install command gives errors. And when I try to run node app.js command in the correct project directory it shows this error

C:\exprob\exprob>node app.js
    throw err;

Error: Cannot find module 'atlassian-connect-express'
    at Function.Module._resolveFilename (module.js:536:15)
    at Function.Module._load (module.js:466:25)
    at Module.require (module.js:579:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\exprob\exprob\app.js:13:10)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)

Would be great if I could get some help. Thanks

Hi, @manosree. Please attach errors that npm install gives you. Error that you get when running node app is no quite helpful, because it’s consequences of installation.
Try this:

  1. Try using yarn
  2. If it doesn’t help -> try to reinstall atlassian-connect-express (make sure it’s global)
  3. If it doesn’t help -> try to reinstall whole node
  4. repeat once from 1

Also can you show your package.json?


I should have attached the errors shown during npm-install command. Looks like I’m not allowed to upload any attachments yet, I’m just copy/pasting the errors shown in my cmd propmt. Also I’ll follow your instructions and update you.

node-pre-gyp ERR! Tried to download:
node-pre-gyp ERR! Pre-built binaries not found for sqlite3@3.1.4 and node@8.9.3 (node-v57 ABI) (falling back to source compile with node-gyp)
node-pre-gyp http 403 status code downloading tarball
node-pre-gyp verb command build [ ‘rebuild’ ]
gyp ERR! configure error
gyp ERR! stack Error: Can’t find Python executable “python”, you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Users\user\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack at PythonFinder. (C:\Users\user\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack at C:\Users\user\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command “C:\Program Files\nodejs\node.exe” “C:\Users\user\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js” “configure” “–fallback-to-build” “–module=C:\exprob\exprob\node_modules\sqlite3\lib\binding\node-v57-win32-x64\node_sqlite3.node” “–module_name=node_sqlite3” “–module_path=C:\exprob\exprob\node_modules\sqlite3\lib\binding\node-v57-win32-x64”
gyp ERR! cwd C:\exprob\exprob\node_modules\sqlite3
gyp ERR! node -v v8.9.3
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute ‘C:\Program Files\nodejs\node.exe C:\Users\user\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\exprob\exprob\node_modules\sqlite3\lib\binding\node-v57-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\exprob\exprob\node_modules\sqlite3\lib\binding\node-v57-win32-x64’ (1)
node-pre-gyp ERR! stack at ChildProcess. (C:\exprob\exprob\node_modules\sqlite3\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:126:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:214:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:925:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
node-pre-gyp ERR! System Windows_NT 10.0.15063
node-pre-gyp ERR! command “C:\Program Files\nodejs\node.exe” “C:\exprob\exprob\node_modules\sqlite3\node_modules\node-pre-gyp\bin\node-pre-gyp” “install” “–fallback-to-build”
node-pre-gyp ERR! cwd C:\exprob\exprob\node_modules\sqlite3
node-pre-gyp ERR! node -v v8.9.3
node-pre-gyp ERR! node-pre-gyp -v v0.6.28
node-pre-gyp ERR! not ok
Failed to execute ‘C:\Program Files\nodejs\node.exe C:\Users\user\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\exprob\exprob\node_modules\sqlite3\lib\binding\node-v57-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\exprob\exprob\node_modules\sqlite3\lib\binding\node-v57-win32-x64’ (1)
npm ERR! errno 1
npm ERR! sqlite3@3.1.4 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sqlite3@3.1.4 install 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\user\AppData\Roaming\npm-cache_logs\2018-01-18T10_35_15_703Z-debug.log

Thanks @alexter_pr.

Oh yeah, i faced same problem and same error. Yarn solved my problem. But you can also try to install python, because that something that gyp can’t find

1 Like

I tried installing python and set the environment variables, but still din’t work. I tried using yarn to get the dependencies, but it was giving the exact same errors. Do you have any other advice? @alexter_pr

The add-on sever started. Before when I was using npm install the node app.js threw error, but using yarn started the server despite the errors. Thanks for the help

Well that’s odd :smile:
Anyway i would try to reinstall node, make sure i’m using x64 OS, because i saw somewhere that sqlite3 is not building from sources if it’s x32 system and it fails then, also installing python and making sure it’s in the PATH and works, since npm tries to build sqlite with python or something.
Also i would go straight to posgres :rofl: