What version of node should you use?

I have to develop an ionic cordova application from scratch. What version of node should you use right now?

I tried to build a simple helloworld app but there are several errors during android build.

Please help me

L

@Hills90210 thanks for your fast reply. I know very well the tecknology stack required. I work with cordova and ionic about 10 years.

I have several problems with upgrade my old apps.

Now I need to create a new app and I want to start with correct versions of all dependencies.

I’m looking for some advice to start the job on the right foot

Thanks

if you take the time to read it, it tells you what version of node to use…

Unfortunately I can not understand. i installed the latest version of node (LTS 18.15.0) using NVM.
NVM install also NPM 9.5.0.

Installation of Angular Client generate error:

npm i @angular/cli@latest
npm i @angular/cli@latest
ERROR: npm v9.5.0 is known not to run on Node.js v18.15.0. You'll need to upgrade
to a newer Node.js version in order to use this version of npm. This version of
npm supports the following node versions: `^14.17.0 || ^16.13.0 || >=18.0.0`. You
can find the latest version at https://nodejs.org/.

ERROR:
C:\tools\nvm\v18.15.0\node_modules\npm\node_modules\@npmcli\arborist:1
../../workspaces/arborist
^

SyntaxError: Unexpected token '.'
    at internalCompileFunction (node:internal/vm:73:18)
    at wrapSafe (node:internal/modules/cjs/loader:1176:20)
    at Module._compile (node:internal/modules/cjs/loader:1218:27)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.<anonymous> (C:\tools\nvm\v18.15.0\node_modules\npm\lib\npm.js:1:18)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)

ERROR: npm v9.5.0 is known not to run on Node.js v18.15.0. You'll need to upgrade
to a newer Node.js version in order to use this version of npm. This version of
npm supports the following node versions: `^14.17.0 || ^16.13.0 || >=18.0.0`. You
can find the latest version at https://nodejs.org/.

Your nvm is installing the wrong npm version. Uninstall node and npm. And install it fresh. In the download section in node.js website. shows: Latest LTS Version: 18.16.0 (includes npm 9.5.1)

Ionic:

   Ionic CLI                     : 7.1.1 (C:\tools\nvm\v16.14.0\node_modules\@ionic\cli)
   Ionic Framework               : @ionic/angular 7.0.7
   @angular-devkit/build-angular : 16.0.2
   @angular-devkit/schematics    : 15.2.0
   @angular/cli                  : 15.2.0
   @ionic/angular-toolkit        : 9.0.0

Cordova:

   Cordova CLI       : 11.1.0
   Cordova Platforms : android 11.0.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 3 other plugins)

Utility:

   cordova-res : not installed globally
   native-run  : not installed globally

System:

   Android SDK Tools : 26.1.1 (C:\Users\myuser\AppData\Local\Android\Sdk)
   NodeJS            : v16.14.0 (C:\Program Files\nodejs\node.exe)
   npm               : 8.3.1
   OS                : Windows 10

Build Android:

ionic cordova build android --prod --release -- -- --packageType=bundle

Error:

> ng.cmd run app:ionic-cordova-build:production --platform=android
Error: Unknown argument: platform
[ERROR] An error occurred while running subprocess ng.

        ng.cmd run app:ionic-cordova-build:production --platform=android exited with exit code 1.

        Re-running this command with the --verbose flag may provide more information.

:frowning:

looks like a nvm bug, try updating nvm to 1.1.10 or newer