Fdk installation error with node js version

I have tried to run the fdk version command with node 14.0.0 and 18.16.0 and in both cases it throws the same error that the node version is not supported. How do I resolve this?

swarnakadagadkai@Swarnas-MacBook-Pro ~ % nvm use 14.0.0
Now using node v14.0.0 (npm v6.14.4)
swarnakadagadkai@Swarnas-MacBook-Pro ~ % node -v
swarnakadagadkai@Swarnas-MacBook-Pro ~ % fdk version
[ERROR]  Node.js version of 18.x.x is required to run this SDK. v14.0.0 found.
swarnakadagadkai@Swarnas-MacBook-Pro ~ % nvm use 18.0.0
N/A: version "v18.0.0" is not yet installed.

You need to run `nvm install 18.0.0` to install and use it.
swarnakadagadkai@Swarnas-MacBook-Pro ~ % nvm ls
->      v14.0.0
default -> 10.18 (-> v10.18.1)
iojs -> N/A (default)
unstable -> N/A (default)
node -> stable (-> v18.16.0) (default)
stable -> 18.16 (-> v18.16.0) (default)
lts/* -> lts/hydrogen (-> v18.16.0)
lts/argon -> v4.9.1 (-> N/A)
lts/boron -> v6.17.1 (-> N/A)
lts/carbon -> v8.17.0 (-> N/A)
lts/dubnium -> v10.24.1 (-> N/A)
lts/erbium -> v12.22.12 (-> N/A)
lts/fermium -> v14.21.3 (-> N/A)
lts/gallium -> v16.20.0 (-> N/A)
lts/hydrogen -> v18.16.0
swarnakadagadkai@Swarnas-MacBook-Pro ~ % nvm use 18.16.0
Now using node v18.16.0 (npm v9.5.1)
swarnakadagadkai@Swarnas-MacBook-Pro ~ % fdk version
[ERROR]  Node.js version of 14.x.x is required to run this SDK. v18.16.0 found.
swarnakadagadkai@Swarnas-MacBook-Pro ~ % 

Hi @Swarna_Kadagadkai ,

I understand you are upgrading from FDK 8.7.6 to FDK 9 and post-upgrade facing this issue. Did you manage to remove the old ~/.fdk folder prior to upgrade as mentioned in here. If not done already, remove the ~/.fdk directory, use Node 18 version, update NPM to latest and then reinstall FDK.
Optionally you can refer to this guide


Hey @Thakur_Ganeshsingh I followed the guide and I’m getting the same error, still.

nvm maintains a separate installation directory for modules for each Node.js version installed. So, when you switch Node versions with nvm use 18, you will have to reinstall FDK 9. FDK 9 uses a different installation path than FDK 8.x and older.

nvm use 18.16
npm remove -g fdk
npm install https://cdn.freshdev.io/fdk/latest.tgz -g

If this succeeds, try running the fdk command again.

Got it @kaustavdm. It’s working now. I had to switch the node version, uninstall the previous version of the fdk, remove the fdk folder and then reinstall it. Thank you!

1 Like