Hello World - Part 2 Deploy error

I can deploy and install the standard “Hello World” app that is created with “forge create”. But, I can’t deploy the example in “Hello World - Part 2” (the source code doesn’t come through when I attempted to paste it here and I can only attach one file but the source code can be found in https://developer.atlassian.com/platform/forge/call-a-jira-api/).

First, I get this:
error Jira endpoint: GET /rest/api/3/issue/{issueIdOrKey}/comment requires “read:jira-work” scope permission-scope-required
X 1 issue (1 error, 0 warnings)
Run forge lint --fix to automatically fix 1 error and 0 warnings.

Then, after dutifully running “forge lint --fix”, which claims to have fixed the error, I try “forge deploy” again and get a 50 line error message starting with this. The entire error message is attached:

Error: Bundling failed: ./src/index.jsx
Module not found: Error: Can’t resolve ‘@forge/api’ in ‘/Users/debbie/Documents/Jira App Development/hello-world-part-2/src’
resolve ‘@forge/api’ in ‘/Users/debbie/Documents/Jira App Development/hello-world-part-2/src’
Parsed request is a module
using description file: /Users/debbie/Documents/Jira App Development/hello-world-part-2/package.json (relative path: ./src)
Field ‘browser’ doesn’t contain a valid alias configuration
resolve as module
/Users/debbie/Documents/Jira App Development/hello-world-part-2/src/node_modules doesn’t exist or is not a directory

Maybe this is a red-herring, but the [long] error message does seem to complain that /src/node_modules doesn’t exist. Well, “forge create” put “node_modules” directly under the app (“hello-world-part-2”) rather than under /src. Are we supposed to reorganize the folders? If so, the tutorial left out that step.

My environment:

  • iMac running macOS Big Sur, version 11.2.3
  • Node v14.16.0
  • Docker version 20.10.5

This is new to me so I’d appreciate any help or hints. Thanks.


If you run npm install in your app directory, this should be resolved.