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
Percy
Percy17mo ago
Project ID: 183edab8-e67d-4ff7-8fe6-35372aac1c64
zDeathSouls
zDeathSouls17mo ago
183edab8-e67d-4ff7-8fe6-35372aac1c64
Brody
Brody17mo ago
can you share your repo please?
zDeathSouls
zDeathSouls17mo ago
GitHub
GitHub - Jesus082/deepFoundjesus
Contribute to Jesus082/deepFoundjesus development by creating an account on GitHub.
Brody
Brody17mo ago
this looks like you just copied a vite app into a larvel project can you help me to understand why you have done that
zDeathSouls
zDeathSouls17mo ago
mm sorry I don't understand much, how do you get a vite application in a laravel project?
Brody
Brody17mo ago
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
zDeathSouls
zDeathSouls17mo ago
mm I don't know, the application is supposed to need npm for the javascript dependencies, right? forgive my ignorance on this topic
Brody
Brody17mo ago
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
zDeathSouls
zDeathSouls17mo ago
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
Brody
Brody17mo ago
so you dont actually know what vite is?
zDeathSouls
zDeathSouls17mo ago
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
Brody
Brody17mo ago
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
zDeathSouls
zDeathSouls17mo ago
I think so, how can I do that?
Brody
Brody17mo ago
now im not a php dev, so im going to be making most of this up first remove the repo from the railway service
zDeathSouls
zDeathSouls17mo ago
okey
Brody
Brody17mo ago
let me know when done and show proof please
zDeathSouls
zDeathSouls17mo ago
ok i deleted it
Brody
Brody17mo ago
and show proof please
zDeathSouls
zDeathSouls17mo ago
you need a screenshot?
Brody
Brody17mo ago
yes please
zDeathSouls
zDeathSouls17mo ago
Brody
Brody17mo ago
where is your service
zDeathSouls
zDeathSouls17mo ago
deleted, I create a new one to start from 0
Brody
Brody17mo ago
but i didnt say to do that? this is going to be quite hard if you go off and start doing your own things
zDeathSouls
zDeathSouls17mo ago
I understood that I would have to delete it, sorry
Brody
Brody17mo ago
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
zDeathSouls
zDeathSouls17mo ago
zDeathSouls
zDeathSouls17mo ago
I'm like this, is that correct?
Brody
Brody17mo ago
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
zDeathSouls
zDeathSouls17mo ago
zDeathSouls
zDeathSouls17mo ago
embedded variables
Brody
Brody17mo ago
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
zDeathSouls
zDeathSouls17mo ago
zDeathSouls
zDeathSouls17mo ago
now?
Brody
Brody17mo ago
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! 🙂
root
root17mo ago
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?
Want results from more Discord servers?
Add your server