-
Notifications
You must be signed in to change notification settings - Fork 373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to deploy SolidStart with node though it works locally #758
Comments
Hi Matt, fyi, I'm on 0.2.21 and deploying to EC2 instance w/o any issues (using node adapter). [edit: I'm on node 16.16.0/AWS Linux2] Regarding prisma, I used workaround documented here: // #398 (comment) i.e., ...
Odd that no such issue and hack needed for SvelteKit, which also packages using Vite / requires esm. |
Weird... What is the Node adapter exactly? Is that something I need to add in specifically? |
@MattStopa can you confirm you have also can you clarify how you are getting your files on your server.. are you just copying the dist directory or the whole app and building it? |
also, is your node on DO >=v16.2? |
Yes type = module. I just copied the dist over. Am I supposed to do the build on that machine? I didn't even consider doing that. |
If you don't have any native dependencies just copying the dist folder is fine but you will also need to copy the package.json.. what you can try first is change the extension from .js to .mjs |
So... I just went ahead and built on my target machine and it works fine. That didn't work well because I was using a shared webhost and couldn't do an NPM install there but I tired on DO and it works fine. So there's that at least. I'm going to close |
So I have a bare bones JS only SolidStart app I created today, brand new. Node version is 18.
I create the initial app with the counter. It works great right out of the box. I do a build. I go into the dist directory and run
node server.js
. Works exactly the same.I have a DO box I created just for this purpose. I scp the files over, no changes. Go into the directory and get the following error:
I've looked through existing bugs but most of them focus on Prisma being an issue so I specifically avoided adding it. I read some documentation on the SolidStart site that you may need an adapter but didn't see anything about what I needed to use. Also, for whatever reason the node app has no trouble running.
I'm thoroughly confused why this would happen on remote boxes but not my own. I'm not sure if this is a bug or designed behavior (seems unlikely).
If this is an uncaught bug that's fine or if I'm just pointed in the wrong direction please let me know.
Thank you
Mind boggling to me why this works locally but not on any server...
The text was updated successfully, but these errors were encountered: