how to deploy a website built with the solid.js framework on vercel?; troubleshooting

I deployed my Solid.js project on Vercel using GitHub, initially selecting Vite as the framework. However, the deployment failed due to some file path issues, which I resolved by correcting the paths and deleting the pnpm file. Did deleting the pnpm file affect the project and cause it to fail? Afterward, I changed the build command to a different one found in the scripts, but then reverted it back to the original. Despite these adjustments, the project still isn't working. Although the local build runs without errors, the deployment fails, stating that the npm build failed. How can I resolve this confusion and make the deployment successful?
No description
No description
15 Replies
Jasmin
Jasmin9mo ago
Can you show the full error log?
ghost_soul0
ghost_soul0OP9mo ago
here it is
No description
Jasmin
Jasmin9mo ago
@ghost_soul0 do you checkout your node_modules folder?
ghost_soul0
ghost_soul0OP9mo ago
do you mean checkout using git?
Jasmin
Jasmin9mo ago
yes. Did you push your node_modules folder?
ghost_soul0
ghost_soul0OP9mo ago
ig i added all file names in gitignore file once because i was frustrated by git and its commands while trying to upload the code from my local machine to github . i read somewhere that after adding names in gitignore file git ignores that folder or file . but then i removed them , did that affected something ? yes, i mean i pushed entire code inlcuding node modules
Jasmin
Jasmin9mo ago
That's the issue you don't want to push the node_modules folder. It gets created automatically by your package manager
ghost_soul0
ghost_soul0OP9mo ago
ohhh means i shouldnt have pushed node modules ?
Jasmin
Jasmin9mo ago
yes
ghost_soul0
ghost_soul0OP9mo ago
omg means when deployed website then?
Jasmin
Jasmin9mo ago
what? I don't understand you vercel builds the node_modules folder in the build step you showed above. The issue is that the folder already exists, vercel skips this step but runs into issues because there are executable files in there which got created by you, on your machine.
ghost_soul0
ghost_soul0OP9mo ago
i was asking this only . thank you for answering . should i then delete node modules folder from the repo ?
Jasmin
Jasmin9mo ago
yes no problem :) here to help
ghost_soul0
ghost_soul0OP9mo ago
thank you so much dear @Jasmin . deployment successful after dlting node modules .
No description
Jasmin
Jasmin9mo ago
awesome! :monkyap:
Want results from more Discord servers?
Add your server