WaspW
Wasp•17mo ago
Ron

Can't set client environment when deploying to Fly.io

I've followed the docs https://wasp-lang.dev/docs/advanced/deployment/cli#client to set the client environment variable when deploying to fly.io

I run REACT_APP_API_URL=https://api.myapp.com wasp deploy fly deploy

But when it finished deploying to server and starts to deploy to client, it still execute below command

🚀 Deploying your client now...
$ cd /Users/xxxx/xxxx/app/.wasp/build/web-app
🚀 Building web client for production...
$ npm install

up to date, audited 146 packages in 986ms

19 packages are looking for funding
run npm fund for details

found 0 vulnerabilities
$ REACT_APP_API_URL=https://myproject-server.fly.dev npm run build

And eventually the REACT_APP_API_URL did changed to https://myproject-server.fly.dev instead of my intended value, any clues how to fix this? Appreciate your help!
Was this page helpful?