Hello everyone :),
I am a newb and not that familiar with Payload, so got stuck with my first deploy..
I have got a shared hosting with node.js support and trying to run Payload CMS right there. But after building the instance, uploading the two folders, build and dist, and running the command 'node dist/server.js', I have got an error 'Cannot find module express'.
So I install the express locally. Then it says I need Payload module, then bundler-vite, then db-mongodb etc, etc, etc..
Do I really need all that huge 800 MB folder with all the modules to run Payload CMS on a web hosting? Or, I am doing something wrong?
Any help would be appreciated a lot.
if you can run commands on your shared server, upload your package.json and package-lock.json and then then npm ci --production
if you cant, then run npm ci --production on your local ... it will wipe out your node_modules and install only what is needed to run the site (no dev dependencies), which should be a little smaller. Then upload node_modules
Thank you very much for the advise! I will try this
Star
Discord
online
Get dedicated engineering support directly from the Payload team.