Can no longer build Ionic 3 (angular) app using node 12 as of May 2023

I have to maintain a legacy Ionic3 App. (Yes I know it’s out of date, we are in the process of porting it to Ionic7)

Ionic3 requires node-sass which isn’t supported > Node12

It was building fine until today when I now get the error:
ERR: Your Node.js version is v12.19.0. Node.js 12 reached end-of-life on 2022-04-30 and is no longer supported. Please update to the latest Node LTS version.

We use NVM (0.39.3) to manage our node version. Up to today we have just swapped back to node12 using NVM

One of my co-workers was able to build today on node v12 until he changed to v18 and then back to v12 and he is now getting the same issue.

I thought it might be the new Ionic cli so I swapped back from Ionic CLI 7 → to 6.18.1. Same problem.

We haven’t changed our NVM version.

The only thing I can think that has changed in the last couple of days is I installed the latest apple rapid security update.

We now can’t build the old Ionic3 app and need to push an update out so are stuck.

Does anyone have suggestions.

We can’t figure out what has caused this issue:

  • nvm
  • ionic cli
  • mac os

Thanks for any help!

Ok, fixed it…

  1. Open a new terminal
  2. Uninstall node 12 nvm uninstall 12
  3. Install node 12 again nvm install 12

Now it works - not sure why :man_facepalming:t3: