Build node project failing

3 months ago

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).

Solved

12 Replies

3 months ago

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


3 months ago

!t


3 months ago

This thread has been escalated to the Railway team.

Status changed to Awaiting Railway Response uxuz 3 months ago


3 months ago

Hey, regarding your application failing to build, have you checked if you have the metal builder enabled in your service's settings and if you do, check if your application builds correctly with it being disabled.


3 months ago

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


3 months ago

Hello, could you please provide a link to the failing build?


Status changed to Awaiting User Response Railway 3 months ago


iloveitaly
HOBBY

3 months ago

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


3 months ago

hello @iloveitaly ,
Sorry for late response.
Here is the logs from the build:
```[Region: us-east4]

╭─────────────────╮
│ 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 node@20.19.6 ✓ installed

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


3 months ago

Here is my package.json

1446144901308747968


iloveitaly
HOBBY

3 months ago

@bledar What is in your .dockerignore?


3 months ago

@iloveitaly 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

3 months ago

Thanks


iloveitaly
HOBBY

3 months ago

Glad we figured it out!


Railway
BOT

3 months ago

This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!

Status changed to Solved Railway 3 months ago


Loading...