ERROR: failed to solve: process "/bin/bash -ol pipefail -c npm run dev" did not complete successful
Hello, I am uploading a laravel project to Railway that needs npm to work, I put my npm run dev command in build command but when I run it, these errors appear:
#15 [11/12] RUN npm run dev
#15 0.709
#15 0.709 > dev
#15 0.709 > vite
#15 0.709
#15 0.718 sh: 1: vite: Permission denied
#15 ERROR: process "/bin/bash -ol pipefail -c npm run dev" did not complete successfully: exit code: 126
-----
[11/12] RUN npm run dev:#15 0.709 #15 0.709 > dev #15 0.709 > vite #15 0.709 #15 0.718 sh: 1: vite: Permission denied ----- Dockerfile:25 ------------------- 23 | # build phase 24 | COPY . /app/. 25 | >>> RUN npm run dev 26 | 27 | ------------------- ERROR: failed to solve: process "/bin/bash -ol pipefail -c npm run dev" did not complete successfully: exit code: 126 Error: Docker build failed the same thing happens with npm run build I would really appreciate the help, thank you very much
37 Replies
Project ID:
183edab8-e67d-4ff7-8fe6-35372aac1c64
183edab8-e67d-4ff7-8fe6-35372aac1c64
can you share your repo please?
GitHub
GitHub - Jesus082/deepFoundjesus
Contribute to Jesus082/deepFoundjesus development by creating an account on GitHub.
this looks like you just copied a vite app into a larvel project
can you help me to understand why you have done that
mm sorry I don't understand much, how do you get a vite application in a laravel project?
lets start with why you would want a vite project in the exact same folder as the laravel project
is the vite app for frontend, and the laravel app for the backend? is that whats going on
mm I don't know, the application is supposed to need npm for the javascript dependencies, right? forgive my ignorance on this topic
yes ive heard of that, but i haven't heard of overlapping a vite app on top of a larvel project
from your original question, you are trying to actually start the vite app
i think vait is something i was installing just today to try and get the app to work on railway and i think one of them was vite
so you dont actually know what vite is?
honestly no. But I still need npm to work for the application to take the styles, if I start the railway without running npm run dev, it works, but the styles are not applied and it gives problems
npm run dev starts vite
but i have a feeling you dont even need vite, you really only need to install the npm dependencies for the styles
I think so, how can I do that?
now im not a php dev, so im going to be making most of this up
first remove the repo from the railway service
okey
let me know when done
and show proof please
ok i deleted it
and show proof please
you need a screenshot?
yes please
where is your service
deleted, I create a new one to start from 0
but i didnt say to do that?
this is going to be quite hard if you go off and start doing your own things
I understood that I would have to delete it, sorry
nope didnt say that
either way, moving on
create a blank service
and please show me a screenshot so i can make sure that things are going smoothly
I'm like this, is that correct?
yes, but i dont rememeber telling you to create a database yet
this is going to be quite hard if you go off and start doing your own things
either way, moving on
go ahead and setup the variable references for your database
https://docs.railway.app/develop/variables#reference-variables
and please show me a screenshot of that once done
embedded variables
not quite, you have not used variable references, delete the database variables please.
then go ahead and setup the variable references for your database
https://docs.railway.app/develop/variables#reference-variables
and please show me a screenshot of that once done
now?
I don't think my attempts to guide you in the right direction are bearing any fruit. I have other threads from other users to attend to and wish you the best as you debug your issue. Hopefully it gets resolved! 🙂
I know a few things about PHP, but the repository link you sent above doesn't seem to work. Could you send the correct link so I can look through your code and see what you need?