Error during angular build

We have a quite simple Angular application that is part of a Node Expressjs application.
We build the angular app using the followinf command:

npx ng build my_webapp --prod

And we get this error:

- Generating browser application bundles...
An unhandled exception occurred: EACCES: permission denied, mkdir '/__w/my_webapp/my_webapp/public/app'
See "/tmp/ng-joMyvM/angular-errors.log" for further details.
npm ERR! code 127
npm ERR! path /__w/my_webapp/my_webapp
npm ERR! command failed
npm ERR! command sh -c ng "build" "my_webapp" "--prod"

In the yml file we simply call

- run: npm run build_web_app

Do we need to give specific permissions?
Thank you

For the best help, you should either open an issue on the Angular repository or find an Angular discord server.

From the error message I can simply recommend you either using sudo or give the executing user the permissions for the highlighted directories

I don’t think that this is an Angular issue, I get the same error with SASS and Terser, every time a step needa to generate some output files and write it I get this error.

Then follow my suggestions I gave you above.

Besides that, your specific use case is an Angular build and therefore the mentioned Angular repository is more appropriate than this forum to get proper help.