Forge cannot find module when using Forge Tunnel with native NodeJS

Hello!

I encountered the same problem as Forge tunnel with native node and custom UI but now I have a shiny new one:

Uncaught (in promise) Error: There was an error invoking the function - Cannot find module 'C:\Users\harman\AppData\Local\Temp\tunnel-8884-4hVclbrv0D55\index.cjs.js'

Require stack:
- C:\Users\harman\AppData\Local\Temp\tunnel-8884-4hVclbrv0D55\index.cjs
- C:\Users\harman\AppData\Roaming\npm\node_modules\@forge\cli\node_modules\@forge\node-runtime\out\sandbox\sandbox-runner.js
    at invoke (https://jira-frontend-bifrost.prod-east.frontend.public.atl-paas.net/assets/async-forge-ui-iframe-dashboard-gadget.59c4cddb.js:69:3583)
    at async https://jira-frontend-bifrost.prod-east.frontend.public.atl-paas.net/assets/async-forge-ui-iframe-dashboard-gadget.59c4cddb.js:69:77129

I’m using Node LTS 20.10. My forge deploys work fine, its the tunnel that does not work. For the meantime I went back to docker to run the tunnel by removing the following from the manifest.yml

runtime:
    name: nodejs18.x

I’ve checked these directories but the only file that does not exist is index.cjs.js? Any clue?

Hi Tristan,

Thanks for the feedback!
We have identified that the issue you reported is specific to the Windows Operating System. Our team is actively working on a resolution.

@Tristan can you please try again and let me know if still having issues?

Hey @JingYuan ,

I was able to run the code natively! Thanks for the quick turnaround! I suppose it was something on the Jira PaaS backend that needed to be changed?

Thanks for the feedback!
The issue arose from parsing the bundled file path for the Windows OS. We have fixed the script and deployed it to CDN.

1 Like