How to set Node version?

Where does Wappler get it’s nodejs version info from ?

I’m trying to install puppeteer to support html2pdf and as part of that it’s installing sharp.

I’ve upgraded my node version to 14.15.1 - as evidenced here:

Yet when I try to build I’m getting this error:

npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I’ll try
to do my best with it!

sharp@0.31.1 install /opt/node_app/node_modules/sharp
(node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)

sharp: Installation error: Expected Node.js version >=14.15.0 but found 12.22.12

What’s the inconsistency here ?

thanks

Are you using Docker?

1 Like

Yes, using docker. It’s proving a challenge.

In target settings under the web section there is a node setting there I have not updated my version just yet but I would assume this is how to upgrade not tried this though

1 Like

The node version on your host computer has nothing to do with the node version that runs inside the Docker container - follow Sorry_Duh’s suggestion to change the version in your project settings, which in turn will update your docker-compose file to use the new version

1 Like

Thanks both. I’ve found the option to upgrade to 14 or 16. Time to start tinkering.

3 Likes

Hey John, Were there any unintended side effects upgrading Node in the target settings? Would appreciate any experience you could share. Thanks for going out there ahead of us :slight_smile:!

No issues Mark.

1 Like

Interesting, I just upgraded to Node 16 and the site seems to have lost the database connection. This is multi tenant site and we get a 404 Page not found error on all the tenants. Although Navigating directly to the primary URL works successfully. Any troubleshooting suggestions would be welcomed. Thanks

I’ve only gone to 14. Had no issues. What’s driving the news for 16 release

Thanks for getting back! Seems it might have been a mistake. I probably should have gone to 14. Any experience or advise going back to 14?

Suck it and see. I didn’t have any issues. Make sure you’re backed up tho’

1 Like

Have you done npm install again? (install packages on Wappler I think)

1 Like

Thanks, tried and unfortunately, failed