I am new to development on Jira Cloud and am currently exploring creating apps using the Atlassian Forge. I was trying to use Express JS in the code as a middleware. Turns out that during deployment, it keeps giving this error "process.cwd is not a function."
The error received while deploying the app.
I tried installing process module (via npm i process; which was successfully done) and updating the webpack version but none of it worked.
- Can someone please tell what could be causing this error?
- If possible please suggest the alternative for using Express JS in Altassian Forge?
Thanks in advance. Apoorva
From the documentation:
If Express JS depends on
process.cwd()
, that would explain the error. You may be able to work around this if it depends on it in theory but not in practice:process.cwd()
is only used in test cases or example code, you can delete it or make sure it's not bundled."/"
would work, you could stub out the call using DefinePlugin or similar.