Cannot read the fail property from an undefined plugin

I had a problem installing a custom plugin in Cordoba.

plugman -d install --platform android --project platforms\android --plugin plugins\PrintName 

Error:

 Cannot read property 'fail' of undefined TypeError: Cannot read property 'fail' of undefined at C:\...\AppData\Roaming\npm\node_modules\plugman\node_modules\cordova-lib\src\plugman\fetch.js:168:18 at _fulfilled (C:\...\AppData\Roaming\npm\node_modules\plugman\node_modules\q\q.js:787:54) at self.promiseDispatch.done (C:\...\AppData\Roaming\npm\node_modules\plugman\node_modules\q\q.js:816:30) at Promise.promise.promiseDispatch (C:\...\AppData\Roaming\npm\node_modules\plugman\node_modules\q\q.js:749:13) at C:\...\AppData\Roaming\npm\node_modules\plugman\node_modules\q\q.js:509:49 at flush (C:\...\AppData\Roaming\npm\node_modules\plugman\node_modules\q\q.js:108:17) at _combinedTickCallback (internal/process/next_tick.js:131:7) at process._tickCallback (internal/process/next_tick.js:180:9) at Function.Module.runMain (module.js:686:11) at startup (bootstrap_node.js:187:16) 
+5
source share
2 answers

What I need to do is remove plugman 2.0

 npm remove -g plugman 

Then I install the plugin version 1.5.1

 npm install -g plugman@1.5 

Then I could finally add plugins to the project.

+3
source

You need to specify the full path to the plugin, not the relative path. eg:.

 plugman -d install --platform android --project platforms\android --plugin "\full_path\of_your\plugins\PrintName" 
+3
source

Source: https://habr.com/ru/post/1274929/


All Articles