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
Jasmin2mo ago
Can you show the full error log?
ghost_soul0
ghost_soul02mo ago
here it is
No description
Jasmin
Jasmin2mo ago
@ghost_soul0 do you checkout your node_modules folder?
ghost_soul0
ghost_soul02mo ago
do you mean checkout using git?
Jasmin
Jasmin2mo ago
yes. Did you push your node_modules folder?
ghost_soul0
ghost_soul02mo 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
Jasmin2mo 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_soul02mo ago
ohhh means i shouldnt have pushed node modules ?
Jasmin
Jasmin2mo ago
yes
ghost_soul0
ghost_soul02mo ago
omg means when deployed website then?
Jasmin
Jasmin2mo 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_soul02mo ago
i was asking this only . thank you for answering . should i then delete node modules folder from the repo ?
Jasmin
Jasmin2mo ago
yes no problem :) here to help
ghost_soul0
ghost_soul02mo ago
thank you so much dear @Jasmin . deployment successful after dlting node modules .
No description
Jasmin
Jasmin2mo ago
awesome! :monkyap:
Want results from more Discord servers?
Add your server
More Posts
Wrapping `<FileRoutes />` in `ErrorBoundry`Im trying to migrate from the pre 1.0 day, when `solid-start` cli was still a thing. Back then I wasHow do I build my component?Hi guys 👋 I'm a bit confused about how I could build a SolidJS component into JS that I could publPractice of handling application globals in Solid(Start) symmetrically across client and server?Example: In the CSR-only days it was idiomatic to store context value as a module-global value: `Ideal way to load settings/configsSuppose I have a bunch of settings like user preferences (dark mode), or configs which I load using How to call `useNavigate` outside of routerI am trying to create my own "page viewer" where I will be able to navigate between pages within theHydration Mismatch Error Every Time I Update a ComponentI am rewriting an OAuth2 service for one of my apps in SolidStart. I keep getting this error every tHow can I synchronize two stores without running into an infinite loop?The following code triggers an infinite loop: ```ts const [store1, setStore1] = createStore({a: 1, What is the most idiomatic way of disabling an effect after a condition is met?Is it possible to disable an effect after some condition is met or should I just use an early returnpage refresh taking alot of time or may be not loadingI'm new to Solid.js, and I'm facing a problem with browser refreshing. When I make changes to my proGetting `Error | Uncaught Client Exception` without any errors in the consoleRecently, I'm seeing `Error | Uncaught Client Exception` in my browser when navigating to a new page