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
Percy2y ago
Project ID: 183edab8-e67d-4ff7-8fe6-35372aac1c64
zDeathSouls
zDeathSoulsOP2y ago
183edab8-e67d-4ff7-8fe6-35372aac1c64
Brody
Brody2y ago
can you share your repo please?
zDeathSouls
zDeathSoulsOP2y ago
GitHub
GitHub - Jesus082/deepFoundjesus
Contribute to Jesus082/deepFoundjesus development by creating an account on GitHub.
Brody
Brody2y 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
zDeathSoulsOP2y ago
mm sorry I don't understand much, how do you get a vite application in a laravel project?
Brody
Brody2y 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
zDeathSoulsOP2y 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
Brody2y 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
zDeathSoulsOP2y 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
Brody2y ago
so you dont actually know what vite is?
zDeathSouls
zDeathSoulsOP2y 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
Brody2y 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
zDeathSoulsOP2y ago
I think so, how can I do that?
Brody
Brody2y 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
zDeathSoulsOP2y ago
okey
Brody
Brody2y ago
let me know when done and show proof please
zDeathSouls
zDeathSoulsOP2y ago
ok i deleted it
Brody
Brody2y ago
and show proof please
zDeathSouls
zDeathSoulsOP2y ago
you need a screenshot?
Brody
Brody2y ago
yes please
zDeathSouls
zDeathSoulsOP2y ago
Brody
Brody2y ago
where is your service
zDeathSouls
zDeathSoulsOP2y ago
deleted, I create a new one to start from 0
Brody
Brody2y 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
zDeathSoulsOP2y ago
I understood that I would have to delete it, sorry
Brody
Brody2y 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
zDeathSoulsOP2y ago
zDeathSouls
zDeathSoulsOP2y ago
I'm like this, is that correct?
Brody
Brody2y 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
zDeathSoulsOP2y ago
zDeathSouls
zDeathSoulsOP2y ago
embedded variables
Brody
Brody2y 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
zDeathSoulsOP2y ago
zDeathSouls
zDeathSoulsOP2y ago
now?
Brody
Brody2y 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
root2y 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