Chris
Chris

Reputation: 4748

Running Ionic project using specific Node version

I am trying to run an Ionic project using Node version 14.18.3

I am using Volta to set this version for this one particular project

To do this I ran this command:

volta pin node@14

If I navigate to my project and run node -v then I see 14.18.3

When I try and build my project it fails and gives me an error that indicates that my node version is not 14

If I run ionic info then I see the following output. This shows that my node version is 16.13.1

Question - where is 16.13.1 coming from? How do I get Ionic to run using node 14?

Ionic:

   Ionic CLI          : 6.18.1 (/Users/chris/.volta/tools/image/packages/@ionic/cli/lib/node_modules/@ionic/cli)
   Ionic Framework    : ionic-angular 3.9.3
   @ionic/app-scripts : 3.2.1

Cordova:

   Cordova CLI       : 9.0.0 ([email protected])
   Cordova Platforms : android 9.0.0, ios 5.1.1
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.0, (and 17 other plugins)

Utility:

   cordova-res                          : 0.15.4
   native-run (update available: 1.5.0) : 0.3.0

System:

   Android SDK Tools : 26.1.1 (/Users/chris/Library/Android/sdk)
   ios-deploy        : 1.10.0
   ios-sim           : 8.0.2
   NodeJS            : v16.13.1 (/Users/chris/.volta/tools/image/node/16.13.1/bin/node)
   npm               : 8.2.0
   OS                : macOS Monterey
   Xcode             : Xcode 13.2.1 Build version 13C100

Upvotes: 1

Views: 2231

Answers (0)

Related Questions