#Build node project failing

13 messages · Page 1 of 1 (latest)

solemn thistle
#

Hello I am trying to deploy a node project (strapi_cms) but is failing in build phase with the error:
ERROR: failed to build: failed to solve: lstat /.env.project: no such file or directory
It was a small change in the content types that are not to the versions or build system.
The project was working completely fine before.
Seems to be related to Railway build system (Railpack).

#

I tried another project to trigger redeployment (using Railway UI) without making any code change.
The build is failing now without any code changes. Two month ago the build was working correctly

neon apex
#

!t

scarlet glacierBOT
neon apex
solemn thistle
#

I tried to enable and disable but the same result. I tried adding a empty env.project and I got the same error about .env.value

scarlet glacierBOT
graceful ferry
#

@solemn thistle I help with railpack development. Could you share your build log and as much of your package.json as you can?

solemn thistle
#

hello @graceful ferry ,
Sorry for late response.
Here is the logs from the build:

 
╭─────────────────╮
│ Railpack 0.14.0 │
╰─────────────────╯
 
↳ Found .dockerignore file, applying filters
↳ Detected Node
↳ Using pnpm package manager
↳ Found workspace with 1 packages
 
Packages
──────────
node  │  20.19.6  │  package.json > engines > node (>=20.19.0)
pnpm  │  9.15.9   │  railpack default (9)
 
Steps
──────────
▸ install
$ pnpm add -g node-gyp
$ pnpm install --frozen-lockfile --prefer-offline
 
▸ build
$ pnpm run build
 
Deploy
──────────
$ pnpm run start
 
 
Successfully prepared Railpack plan for build
 
 
context: 68gf-OFSl

load build definition from railpack-plan.json
0ms

library/alpine:pull token for registry-1.docker.io
0ms

install apt packages: libatomic1
2s
Get:1 http://deb.debian.org/debian bookworm InRelease [151 kB]
Get:2 http://deb.debian.org/debian bookworm-updates InRelease [55.4 kB]
Get:3 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
Get:4 http://deb.debian.org/debian bookworm/main amd64 Packages [8791 kB]
Get:5 http://deb.debian.org/debian bookworm-updates/main amd64 Packages [6924 B]
Get:6 http://deb.debian.org/debian-security bookworm-security/main amd64 Packages [288 kB]
Fetched 9340 kB in 1s (8178 kB/s)
Reading package lists...
Reading package lists...

install mise packages: node, pnpm
2s
mise [email protected] ✓ installed

copy / /app, /.env.project /app/.env.project
204ms
ERROR: failed to build: failed to solve: lstat /.env.project: no such file or directory```
graceful ferry
#

@solemn thistle What is in your .dockerignore?

solemn thistle
#

@graceful ferry apparently .dockerignore was the problem. It was there before and never deleted after migrating to Railpack.
This was my .dockerignore(now deleted):

cicd/
.env*
.flaskenv*
!.env.project
!.env.vault
node_modules
#

Thanks