简体   繁体   中英

Confluence “Hello World” Macro help - NPM install/start not working

I am trying to make my first confluence macro and I am following the instructions laid out here: https://developer.atlassian.com/cloud/confluence/getting-started/?_ga=2.78735767.2027190294.1547046060-2004234667.1546438516

Currently, I am having trouble with steps 2 and 4; NPM install and NPM start:

Received the following errors:

 ➜ ~ cd confluence_app ➜ confluence_app ➜ confluence_app ls confluence-helloworld-addon credentials.json package-lock.json ➜ confluence_app ls confluence-helloworld-addon ➜ confluence_app cd confluence-helloworld-addon ➜ confluence-helloworld-addon git:(master) npm install package.json npm notice created a lockfile as package-lock.json. You should commit this file. + package.json@2.0.1 added 74 packages from 35 contributors and audited 162 packages in 29.12s found 0 vulnerabilities ➜ confluence-helloworld-addon git:(master) ✗ npm start > helloworld-addon@0.0.1 start /Users/serdarmustafa/confluence_app/confluence-helloworld-addon > node app.js internal/modules/cjs/loader.js:583 throw err; ^ Error: Cannot find module 'express' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15) at Function.Module._load (internal/modules/cjs/loader.js:507:25) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18) at Object.<anonymous> (/Users/serdarmustafa/confluence_app/confluence-helloworld-addon/app.js:6:15) at Module._compile (internal/modules/cjs/loader.js:689:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) at Module.load (internal/modules/cjs/loader.js:599:32) at tryModuleLoad (internal/modules/cjs/loader.js:538:12) at Function.Module._load (internal/modules/cjs/loader.js:530: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! /Users/serdarmustafa/.npm/_logs/2019-01-12T09_26_18_269Z-debug.log 

run npm cache clean --force first, and then run npm install , then npm start

this should fix it..

-- OR delete the node_modules folder and re-run npm install

-- OR 1. npm cache clean --force

  1. delete node_modules and package-lock.json ,

  2. npm install

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM