Nevermind, I didn't have the app started. I started it and it's back to the error.
Knex: run\n$ npm install mysql2 --save\nopen EEXIST...sigh
Nevermind, I didn't have the app started. I started it and it's back to the error.
Knex: run\n$ npm install mysql2 --save\nopen EEXIST...sigh
Go to setup node app in cPanel and select your app and look at the node dependencies
Check mysql2 is in list
Then click "run NPM install"
It is and the folder is there too.
Sorry to keep bothering you. Don't want to take too much of your time. I'll just contact support.
Well the good news is they responded extremely quick....the bad news is this was the reply......
" Hamad (OrangeHost)
Aug 10, 2024, 4:47 PM GMT+4
Hello,
We are sorry, our support is limited to wordpress websites.
You will need to contact developers regarding this.
Best Regards,
Syed Hamad Khalid
Manager at OrangeHost"
Maybe try updating the mysql2 package.
Working version from one of our package.json files:
"mysql2": "^3.6.5",
Wow, cant believe that reply, they have helped me re node on many previous occasions and even tweaked their platform from my recommendations-
I was suprised too by the response for the exact same reason. I remember they tweaked the platform for you. I even stated in my initial message to them that I was on their platform at your recommendation. Figured a little name dropping wouldn't hurt haha.
Yes I've tried the run npm install several times, deleted the folder tried again. I'm trying something new right now and I'll let you know if it works or not.
The good thing is, this is a fresh site so it's not like my site is down that was working before and if all else fails, I can delete the app from Orangehost and try fresh or move to different hosting solution, although the price is right on Orangehost.
Again, thanks for all your help, Brian. You're going above and beyond what you need to do. By the way, which part of England do you live in? My son is attending University of York. He's home in the states now, but will be back for his second year in Sept.
-Twitch
I cant work out what is happening with your install as I have done this several times without issues.
Normally just publish (to ensure "package.json" is on server, then run "installed dependencies" from the cPanel and the npm is installed
when you say you deleted the folder - from development or production?
(and thanks for changing my name to Brian )
I was hoping I had changed it quick enough for you not to have noticed haha. Not sure where I got Ben from. That kind of morning, coffee not doing it's job yet. haha
Yes I deleted from production. What I'm trying now is I deleted everything from the node_modules folder on Production and the package.json and package-lock.json files and am uploading what is in my development node_modules folder.
Not sure if this will help, but I a found this on stackoverflow:
"Downgrading to mysql2@2.3.3 finally got me past this problem."
I noticed when I installed from the cpanel, the package.json file would have "mysql2": "^3.11.0" afterward and my applet package.json file shows "mysql2": "^3.6.5", so hoping after everything is uploaded and I start the app, the downgrade will fix it.
Close to out of options.
NO DONT!!!
these files are platform dependent, the files from wappler will not be the correct files!!!
You NEVER upload the node_module file
I have just created a fresh orangehost package, just need to wait for dns to set up.
Once done i will video the process of deployment/ adding a db leading to the need for mysql2 then installing dependencies. Will be a few hours of course
Oh I didn't realize, this is my first deployment of a Node app to production. I'll stop the upload and start fresh.
One thing I did different from your tutorial on orangehost set up was I didn't buy a domain from them, I used my own that I had registered on GoDaddy. I had to point the A record to the orangehost ip and change the nameservers to the orangehost servers and then my domain worked. I did this AFTER I created the nodeapp on orangehost. Do you think this may have screwed something up and deleting the node app and doing a new one will help?
-Twitch
pointing A records is fine, often do that. Just set domain.com and *.domain.com to the server IP
Actually no need to mess with nameservers. I normally leave the unchanged so i can use my usual ISPs mail services etc. The A record will do all the diversions needed
Thanks for reaching out. I was able to resolve it, i had to go back to my expensive digital ocean. I will still appreciate if you can put me through. Thanks
@Bankym I hear you, I had a test version of this app running fine on digital ocean, but was paying $6 a month for hardly any use, thus the desire to switch to Orangehost. I'll let you know if I have any luck. I deleted the first app and redoing fresh. Perhaps something in my first attempt screwed up mappings or something.
Ben did a great job, he even contacted the host on the behalf of Wapplarians.
Yes, if you have not tried that is good way to go.
So now your site is deployed (I assume you published it) , remove your Node app and re-create it.
Check mysql2 is in the package.json file by clicking here
then click install dependencies with Run NPM install
@TwitchBlade I am seeing some npm install issues, think there is something missing in my site setup
Can you try this:
Open cPanel and navigate to Terminal
in terminal, select your nodejs folder i.e. "cd nodejsapp"
type "npm install"
this should install all the dependencies
see if that fixes things
When I started completely fresh and then went to do npm install from the install button in Cpanel, I got this error.
I just saw your post about using the terminal, which I tried in the first deployment, I'll try again with this fresh deployment.
Again, thanks for continuing to help with this. I may try for an hour or so more and then move back to digital ocean just so I can get this app going this weekend. Maybe revisit Orangehost later.