How to solve cordova-plugin-fcm install error?


#1

ionic cordova plugin add cordova-plugin-fcm

cordova plugin add cordova-plugin-fcm --save
Error: Failed to fetch plugin file:node_modules/cordova-plugin-fcm via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: cmd: Command failed with exit code 1 Error output:
npm ERR! code ENOLOCAL
npm ERR! Could not install from “node_modules\cordova-plugin-fcm” as it does not contain a package.json file.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\AppData\Roaming\npm-cache_logs\2017-12-11T15_48_08_486Z-debug.log
[ERROR] An error occurred while running cordova plugin add cordova-plugin-fcm --save (exit code 1).