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?
15 Replies
Can you show the full error log?
here it is
@ghost_soul0 do you checkout your node_modules folder?
do you mean checkout using git?
yes. Did you push your
node_modules
folder?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
That's the issue
you don't want to push the node_modules folder. It gets created automatically by your package manager
ohhh means i shouldnt have pushed node modules ?
yes
omg means when deployed website then?
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.
i was asking this only . thank you for answering .
should i then delete node modules folder from the repo ?
yes
no problem :) here to help
thank you so much dear @Jasmin . deployment successful after dlting node modules .
awesome! :monkyap: