I am getting error - Error: cannot find module 'cordova-common' when installing Cordova

Follow this:

npm uninstall -g cordova
npm install -g cordova@latest

A more simple solution is to install cordova-common npm package (in cordova directory)

npm i cordova-common

Using the above command.


I faced the same issue and I was able to solve it

Solution: 1. Need to Change the owner of the files in your /usr/local folder to the current user

sudo chown -R $USER /usr/local
  1. Again install cordova

sudo npm install -g cordova

Now You will be able to create your file.

cordova create demo com.demo.test DemoApp