Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot read property 'fail' of undefined plugman

I am having problem installing a custom plugin in Cordova.

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)
like image 720
Krups Avatar asked Jan 24 '18 11:01

Krups


2 Answers

What I ended up having to do is uninstall plugman 2.0

npm remove -g plugman

Then I install plugman version 1.5.1

npm install -g [email protected]

Then I could finally add plugins to the project.

like image 129
jnwagstaff Avatar answered Nov 07 '22 22:11

jnwagstaff


You need to specify the full plugin path, not a relative path. e.g.:

plugman -d install --platform android --project platforms\android --plugin "\full_path\of_your\plugins\PrintName"
like image 37
Eddie Lau Avatar answered Nov 07 '22 21:11

Eddie Lau