Ionic 4 Current working directory is not a Cordova-based project

#1

Ionic Info
Ionic:

ionic (Ionic CLI) : 4.10.3 (C:\Users\thoma\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 4.0.2
@angular-devkit/build-angular : 0.12.4
@angular-devkit/schematics : 7.2.4
@angular/cli : 7.2.4
@ionic/angular-toolkit : 1.4.0

System:

NodeJS : v8.11.4 (C:\Program Files\nodejs\node.exe)
npm : 6.5.0

Step to reproduce

  1. Start an ionic 4 project
  2. Try to add this plugin ‘cordova plugin add cordova-pdf-generator’

Error get
Current working directory is not a Cordova-based project

#2

Solution
Dont just use 'cordova plugin add cordova-pdf-generator’,
instead use ‘ionic cordova plugin add cordova-pdf-generator’

1 Like