Home > other >  Node update 12.16.3 -> 14.17.0 unsuccessful after nvm and cache clear
Node update 12.16.3 -> 14.17.0 unsuccessful after nvm and cache clear

Time:08-21

NODE ISSUE No Resolve! I think possible PATH misdirect .... not sure Good evening everyone, I have tried and searched various ways to resolve this. This problem has plagued me for weeks and I have tried and searched most everything I can. Im not sure if my node isnt being updated globally.my issue is the following: Updating node and clearing cache. terminal error In my terminal i am running: npx create-react-app project_ts --template typescript

Returns error: You are running Node 12.16.3. Create React App requires Node 14 or higher. Please update your version of Node. I then proceeded to: Use NVM: nvm install version 14.7.0

Run nvm use v14.7.0 or nvm use v16.17.0
    NVM DOES UPDATE MY NODE VERSION...BUT :
     nvm -v -> shows i am still running v12.16.3.  *I restarted IDE -VSCODE...nothing.

proceeded to clean cache:

Sudo npm cache clean -f Sudo npm install -g n Sudo stable AND SUCCESS, BUT... Upon running code again same issue. Any solutions. Ideally I'd like to resolve this permanently. Thank you

CodePudding user response:

I think you forgot to run nvm use [your version].

Running nvm use v14.7.0 or nvm use v16.17.0 should resolve your issue.

You can install several versions at the same time with nvm. When you install a new one, it doesn't switch the default version automaticaly, you have to choose it afterward.

That said, using nvm use [version] is temporary and will only have effect on the current shell and its sub-processes.

To change your node version globaly, you must run nvm alias default [version].

  • Related