Upgrading node-js

67 views
Skip to first unread message

Michael Reach

unread,
May 14, 2023, 12:32:14 PM5/14/23
to Enterprise Web Developer Community
(I'm moving this question to a separate thread: see also https://groups.google.com/g/enterprise-web-developer-community/c/B8PRfKf98xQ)
We need to upgrade node-js from version 12 to version 18. What are the proper set of steps to follow, so that that qewd-up will continue to work?
Thanks!
Michael Reach

rtweed

unread,
May 15, 2023, 8:42:24 AM5/15/23
to Enterprise Web Developer Community
The steps are pretty simple - basically you want to start from a clean sheet with respect to dependencies loaded by npm install

So if you already have ANY node_modules directories, delete them or, probably better, rename them so they're no longer used/accessed by NPM

Also make sure you don't have a NODEPATH environment variable set which would tell NPM where to look for node_modules directories.

That ought to be enough - npm install will now load a new copy of QEWD and fresh copies of each of its dependencies will be downloaded into a new node_modules folder.

Rob

Michael Reach

unread,
May 15, 2023, 9:14:45 AM5/15/23
to Enterprise Web Developer Community
Thank you, Rob. This is what we did, exactly. I see in the other thread that wdbacker said to delete package-lock.json as well. What do you think caused the issue with socket.io, and what would solve it?
Michael Reach

Michael Reach

unread,
Jul 19, 2023, 12:53:19 PM7/19/23
to Enterprise Web Developer Community
Huh. We tried redoing this in our Development area to see how it would go, before we tried it (again) in Live. 
1) Started with working qewd-up system
2) Stopped the qewd-up from running while we worked.
3) Changed names of node-module folder and package-lock.json file.
4) npm install
5) Restarted qewd-up, or tried to. The script got back SERVICE_PAUSED
6) I checked in our Log folder. The new output.txt file says

Installing mg-dbx interface module for Windows
Node.js version v18is not supported by QEWD
...

Here is the new package.json:

{
  "name": "qewd-up",
  "version": "1.0.0",
  "description": "Automated QEWD Builder",
  "author": "Rob Tweed...",
  "scripts": {
    "start": "node node_modules/qewd/up/run_native"
  },
  "dependencies": {
    "crypto": "^1.0.1",
    "dotenv": "^8.2.0",
    "forever-monitor": "^1.5.2",
    "multer": "^1.4.2",
    "qewd": "",
    "qewd-transform-json": "",
    "socket.io-client": "^2.3.0",
    "vue-qewd": "^2.0.1",
    "vue-router": "^3.4.3"
  }
}

This was working, _with_ Node.js v 18, until we did this install. What has changed, and what should we do instead?

Thanks!
Michael Reach
On Monday, May 15, 2023 at 8:42:24 AM UTC-4 rtweed wrote:

Rob Tweed

unread,
Jul 19, 2023, 1:09:43 PM7/19/23
to enterprise-web-de...@googlegroups.com
Apologies - I need to update the QEWD repo.

In the meantime you can fix it by editing your local copy of the file

 /up/run_native.js 

at line 31 to the following:


Then try starting it again and it ought to work


Rob







--
You received this message because you are subscribed to the Google Groups "Enterprise Web Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to enterprise-web-develope...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/enterprise-web-developer-community/3630c128-3154-49dc-ac85-e07495bea989n%40googlegroups.com.


--
Rob Tweed
Director, MGateway Ltd
http://www.mgateway.com

Michael Reach

unread,
Jul 19, 2023, 1:29:46 PM7/19/23
to Enterprise Web Developer Community
Rob, you're awesome!
Thanks so much.

rtweed

unread,
Jul 20, 2023, 5:47:18 AM7/20/23
to Enterprise Web Developer Community
I've updated the QEWD repo on Github and NPM to include this change

Rob

Michael Reach

unread,
Jul 20, 2023, 8:58:15 AM7/20/23
to Enterprise Web Developer Community
Thanks!
Reply all
Reply to author
Forward
0 new messages