I've been running an angular application on a google cloud app engine service for a few years. I made no changes to my .yaml file or anything related to my node versions and in my deployment pipeline today I have this error when trying to deploy:
Step #4: node: --openssl-legacy-provider is not allowed in NODE_OPTIONS
I've found a few hits on google for this error but all of the resolutions seem to be for getting the application to run locally on my dev environment.
one of the solutions said to run:
unset NODE_OPTIONS
but I"m not sure that's applicable for me since I'm trying to deploy onto a google cloud hosted app service.
I tried updating my node version in my .yaml file just to see if it would fix it (from 10 to 12 and then 12 to 16) nothing works.
I"ve also deleted package-lock.json and reinstalled everything, no joy.
Here is my relevant scripts in package.json:
"scripts": {
"ng": "ng",
"start": "ng serve --ssl --ssl-key c:\\SelfSignedCertificate\\localhost.key --ssl-cert c:\\SelfSignedCertificate\\localhost.crt",
"start:prod": "node dist/myapp/server.js --openssl-legacy-provider",
"build": "export NODE_OPTIONS=--openssl-legacy-provider; ng build --prod && ncp server.js dist/myapp/server.js",
"build:local": "ng build",
"test": "ng test",
"test:headless": "ng test --watch=false --browsers=ChromeHeadless",
"lint": "ng lint",
"e2e": "npm run pre-e2e && ng e2e --webdriver-update=false",
"pre-e2e": "webdriver-manager update --standalone false --gecko false --versions.chrome 86.0.4240.22"
},
TIA
EDIT: I just tried a deployment on a completely different application (in a completely different GCP account) that has had no changes made to it and the same error occurs so GCP must have changed something today (I ran several successful builds yesterday). Can anyone think of a workaround or a solution?