RedwoodJS node build failing due to missing python

Hiya, as of this morning, my deployments of my RedwoodJS/Node API have been failing on the build step, due to what seems like Python being missing and needed by node-gyp.

==> Running build command 'corepack enable && yarn install && yarn rw build api'...
[...]
better-sqlite3@npm:8.6.0 STDERR gyp ERR! stack Error: Could not find any Python installation to use

The strange thing is, this was working just fine as of this morning, and I haven’t made any infra changes.

Looking at an older (successful) deployment, it looks like previously it was able to find an old version of Python: better-sqlite3@npm:8.6.0 STDERR gyp info find Python using Python version 3.7.3 found at "/usr/bin/python3"

I’ve tried running this as a Python environment (since from other posts, node is also available), but then it fails trying to unlink pnpm:

==> Running build command 'corepack enable && yarn install && yarn rw build api'...
Internal Error: EROFS: read-only file system, unlink '/usr/bin/pnpm'
Error: EROFS: read-only file system, unlink '/usr/bin/pnpm'

Hi there,

Just for troubleshooting purposes, could you add which python && ... to the beginning of your build command, and let me know what that prints to your logs.

Regards,

Matt

/home/render/envwrappers/python

I tried adding this to my $PATH and I get a /home/render/colors.sh: line 3: tput: command not found

I’m also noticing that it’s now ignoring my databaseName in my render.yaml and using the default instead.

Hi there,

Thanks for that. We’ve just reverted a change we made on the backend that likely caused this issue.

Could you try redeploying it one more time and let me know how it goes?

Regards,

Matt

1 Like

Awesome! Yeah it has Python again and made it past the build. However it now seems to be ignoring databaseName in render.yaml

Hi there,

Just to confirm, are you trying to create a new database, and thedatabaseName is being ignored? Setting a databaseName will not re-name an existing database.

Regards,

Matt

Hi.

I opened a support ticket internally for this, so I don’t want to double the work (account under the same email). But the problem that started yesterday is I had:

  - key: DATABASE_URL
    fromDatabase:
      name: my-database
      property: connectionString
databases:
  - name: my-database
    databaseName: dbname
    region: oregon

Up until yesterday morning, this caused DATABASE_URL to be postgresql://user:password@host:port/dbname

However after yesterday morning, it’s now postgresql://user:password@host:port/my_database (e.g. the default database for the postgres instance).

In the support ticket though they said that databaseName is only used for creating the database, and not for connection strings. It sounds like fromDatabase doesn’t reference the databases section, so I have to construct the DATABASE_URL manually.

Hi there,

Thanks for the follow up here. We’ll follow up in the support ticket to avoid duplicating efforts.

Regards,

Matt

1 Like