My vue project doesn't build
maguin-barboza
PROOP

9 months ago

Hello.

I'm new in railway and I'm trying to build my vue app, but it crashes when railway try to install the dependecies (npm install in the docker file).

The error is the below:

✕ [build-stage 4/6] RUN npm install process "/bin/sh -c npm install" did not complete successfully: exit code: 1 Dockerfile:11 10 | # Install dependencies 11 | >>> RUN npm install 12 |

It seems like something is going wrong during the installation phase, and I’m not sure how to fix it.

Has anyone experienced this issue or knows what might be causing it?

Thanks in advance for any help!

$10 Bounty

1 Replies

brody
EMPLOYEE

9 months ago

This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.

Status changed to Open brody 9 months ago


lofimit
HOBBY

8 months ago

Hey, I think your Dockerfile isn't copying the package.json before running npm install, so npm freaks out cause it can’t find the dependencies to install.

Make sure ur doing something like:

COPY package*.json ./

RUN npm install

COPY . .

Also, make sure your Node version in the Docker image matches what your Vue app needs. Sometimes using an old or super new Node can mess it up.

If that's not the problem, please share additional information like more of the logs or the Dockerfile.


Loading...