Search code examples
cordova-plugins

Cordova plugin installation and package.json


i am new to cordova.

I created a project using the command cordova create hello com.example.helloapp Hello. The Project is created with default folders and files and a package.json.

Then, i wanted to add a simple plugin from git (a hello world plugin for testing) : cordova plugin add https://github.com/don/cordova-plugin-hello.git .

I get an error that the file package.json dosen't exist in the current directory (current directory = where i created my project hello that contains that file as said earlier), i listed the files with dir /o, see screens below : Image Error & Image package.json

What am i doing wrong ? Thanks in advance.


Solution

  • The plugin mentioned is old, IT IS the one who's missing the .JSON file. Found a newer version and it worked.