npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Aurora\AppData\Roaming\npm-cache_logs\2017-07-06T08_22_04_912Z-debug.log
As for the local notification plugin give the error described above, but I do not understand why in the plugin folder there is, and I also find it in the dependencies of the package.json file, but not in the plugin object.
Toast plugins give only the error.
I also noticed that after these failed setup attempts, my app can only be seen with the emulator, on my device I get the same error when I install the Local Notification and Toast plugins.
Today is the 3rd day I’m stuck, how can we fix it?
Node : v8.1.0
OS : Windows 10
Xcode : not installed
ios-deploy : not installed
ios-sim : not installed
I’m studying a master as a full stack web developer, and in my course forum I was advised to delete the package.locks.json file and then install the plugins.
Doing so, only the Toast Plugin installation has been successful, local notification makes this error:
[ERROR] Cordova encountered an error.
You may get more insight by running the Cordova command above directly.
[ERROR] An error occurred while running cordova plugin add de.appplant.cordova.plugin.local-notification --save (exit
code 1):
Installing "de.appplant.cordova.plugin.local-notification" for android
Plugin dependency "cordova-plugin-device@1.1.4" already fetched, using that version.
Dependent plugin "cordova-plugin-device" already installed on android.
Failed to install 'de.appplant.cordova.plugin.local-notification': Error
at C:\Users\Aurora\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\plugman\fetch.js:205:33
at _rejected
(C:\Users\Aurora\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-fetch\node_modules\q\q.js:864:24)
at
C:\Users\Aurora\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-fetch\node_modules\q\q.js:890:30
at Promise.when
(C:\Users\Aurora\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-fetch\node_modules\q\q.js:1142:31)
at Promise.promise.promiseDispatch
(C:\Users\Aurora\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-fetch\node_modules\q\q.js:808:41)
at
C:\Users\Aurora\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-fetch\node_modules\q\q.js:624:44
at runSingle
(C:\Users\Aurora\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-fetch\node_modules\q\q.js:137:13)
at flush
(C:\Users\Aurora\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-fetch\node_modules\q\q.js:125:13)
at _combinedTickCallback (internal/process/next_tick.js:95:7)
at process._tickCallback (internal/process/next_tick.js:161:9)
Error: Failed to fetch plugin cordova-plugin-app-event via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Failed to get absolute path to installed module
Yes, sorry I didn’t explain it further: ionic cordova platform remove android to remove the Android platform, ionic cordova platform add android to add it again. The plugins should be installed when the platform is added if they were installed correctly before. Run ionic cordova plugin list to check.
I did the following:
1- ionic cordova platform remove android
2-ionic cordova platform add android
3- ionic cordoova plugin add de.appplant.cordova.plugin.local-notification
Here I received the following error:
Now I try to see if the app’s notification works. Because cordova local notification it says error and then it is installed?
Update:
I tried to launch the app but the notification does not come out, in the console I have this error:
TypeError: Can not read property ‘local’ of undefined
At Object.schedule (file: ///android_asset/www/lib/ngCordova/dist/ng-cordova.js: 5042: 45)
At file: ///android_asset/www/js/controllers.js: 300: 43
At file: ///android_asset/www/lib/ionic/js/ionic.bundle.js: 56238: 19
At Object.ionic.Platform.ready (file: ///android_asset/www/lib/ionic/js/ionic.bundle.js: 2140: 9)
At Object.self.ready (file: ///android_asset/www/lib/ionic/js/ionic.bundle.js: 56231: 26)
At Scope. $ Scope.addFavorite (file: ///android_asset/www/js/controllers.js: 298: 30)
At fn (eval at (file: ///android_asset/www/lib/ionic/js/ionic.bundle.js: 27643: 15), : 4: 224)
At file: ///android_asset/www/lib/ionic/js/ionic.bundle.js: 65429: 9
At Scope. $ Eval (file: ///android_asset/www/lib/ionic/js/ionic.bundle.js: 30400: 28)
At file.exe (file: ///android_asset/www/lib/ionic/js/ionic.bundle.js: 30500: 25)