Open joeyhotz opened 1 year ago
This seems to be an issue with the buildpack used by Flightcontrol. There is a similar one opened HERE. As a workaround, you can edit your flightcontrol.json
and add the following line above the "buildCommand" definition of both API and web:
"installCommand": "NODE_ENV=development yarn install --frozen-lockfile",
It will have the same result of having --production=false
.
Your service will look like:
{
"id": "redwood-api",
"name": "Redwood API",
"type": "fargate",
"buildType": "nixpacks",
"cpu": 0.25,
"memory": 0.5,
"installCommand": "NODE_ENV=development yarn install --frozen-lockfile",
"buildCommand": "yarn rw deploy flightcontrol api",
"startCommand": "yarn rw deploy flightcontrol api --serve",
"port": 8911,
"healthCheckPath": "/graphql/health",
"envVariables": {
"REDWOOD_WEB_URL": {
"fromService": {
"id": "redwood-web",
"value": "origin"
}
},
"DATABASE_URL": {
"fromService": {
"id": "db",
"value": "dbConnectionString"
}
}
}
},
Thanks @rgrativol! One thing I'd add: use --immutable
instead of --frozen-lockfile
. They're the same thing, but yarn plans to remove the latter at some point (according to their docs: https://yarnpkg.com/cli/install#details).
I'll try reproducing this and see if I can get in touch with the flightcontrol team to get this working out of the gate.
I received the same error building the web deployment on render.com but was able to fix it by passing the env SKIP_INSTALL_DEPS=true
and running yarn on my own.
Fix found via this https://community.render.com/t/support-for-yarn-2-workspaces/135/4 and should be the default env for Render.
Feb 22 12:31:34 AM ==> Cloning from https://github.com/clarkbw/...
Feb 22 12:31:34 AM ==> Checking out commit 41b20c650aca7017108ef1de2e5448bb92694cd7 in branch main
Feb 22 12:31:38 AM ==> Detected Node version 16.19.1
Feb 22 12:31:40 AM ==> Installing dependencies with Yarn...
Feb 22 12:31:40 AM Unknown Syntax Error: Invalid option name ("--production=false").
Feb 22 12:31:40 AM
Feb 22 12:31:40 AM $ yarn install [--json] [--immutable] [--immutable-cache] [--check-cache] [--inline-builds] [--mode #0]
@rgrativol Your solution solved the problem for me. Thanks.
What's not working?
Trying to deploy a redwoodjs app using flightcontrol but it's failing on the web deploy.
How do we reproduce the bug?
Running the script with yarn v3. I believe that whatever script it is running is only built to support yarn v1 as production=false doesn't seem to be valid input anymore.
https://classic.yarnpkg.com/lang/en/docs/cli/install/
What's your environment? (If it applies)
Are you interested in working on this?