I generated a jira add-on app using Forge CLI. i created the hello-world application using custom UI mode with jira-global tempalte. i deployed and installed it and it worked like a charm. When i tried to get to the next step and use this component : https://atlassian.design/components/page-layout/examples the (page-layout) , i choose to use the first component the basic one. When i added the code used in my App.js i get an error at the level of this line of command : import { SlotLabel, SlotWrapper } from '../common';. i saw what they did in the CodeSandbox : https://codesandbox.io/s/6lwfqv?module=/example.tsx&file=/example.tsx , they created literraly all the tree to get the slotwraper and slotlabel component.

When i did the same thing, the ide return the error : Module not found: Error: Can't resolve './design-system/page-layout/examples/common' in 'C:\jira\pi_planner\static\hello-world\src'

Here is a view of my project structure :

|-- src
|   `-- index.js
|-- static
|   `-- hello-world
|       `-- src
|           `-- design-system  
|               '-- page-layout
|                   '-- examples
|                       '-- common
|           `-- index.js
|           `-- App.js
|       `-- public
|           `-- index.html
|       `-- package.json
|       `-- package-lock.json
|-- manifest.yml
|-- package.json
|-- package-lock.json
`-- README.md

Any one got a clue to help me fix the issue? I'am still learning how to developp jira add-on with Atlassian forge CLI

  • I tried copy past the component code but not working it doesn't find ../common in my project.
  • I triend like in the codesandbox, creating the tree and putting the tsx files but i get the error that the module couldn't be found.
0

There are 0 best solutions below