Build node project failing
bledar
PROOP

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

Awaiting User Response

12 Replies

bledar
PROOP

17 days 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


uxuz
MODERATOR

17 days ago

!t


uxuz
MODERATOR

17 days ago

This thread has been escalated to the Railway team.

Status changed to Awaiting Railway Response uxuz 17 days ago


uxuz
MODERATOR

17 days 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.


bledar
PROOP

17 days 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


brody
EMPLOYEE

17 days ago

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


Status changed to Awaiting User Response Railway 17 days ago


iloveitaly
HOBBY

17 days ago

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


bledar
PROOP

10 days 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```


bledar
PROOP

10 days ago

Here is my package.json

1446144901308747968


iloveitaly
HOBBY

6 days ago

@bledar What is in your .dockerignore?


bledar
PROOP

5 days 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

bledar
PROOP

5 days ago

Thanks


iloveitaly
HOBBY

4 days ago

Glad we figured it out!


Loading...