dpa99c / cordova-check-plugins

A CLI tool to check for / manage plugin updates in Cordova/Phonegap projects.
217 stars 25 forks source link

Wrong cordova path? #22

Closed thomaspeissl closed 7 years ago

thomaspeissl commented 7 years ago

Here is the error I get for every Plugin. I guess it's because I don't have a node_modules folder in this cordova project. Maybe because I have cordova installed globally. Is there a option to use the globally installed cordova? I'm on Fedora 25 btw.

? Update 'cordova.plugins.diagnostic from 3.4.2 to 3.6.5? Yes

Updating 'cordova.plugins.diagnostic'... | Error removing plugin 'cordova.plugins.diagnostic'

Error: Command failed: node node_modules/cordova/bin/cordova plugin rm cordova.plugins.diagnostic -->nosave module.js:471 throw err; ^

Error: Cannot find module '/media/data/public_html/testapp/node_modules/cordova/bin/cordova' at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load (module.js:417:25) at Module.runMain (module.js:604:10) at run (bootstrap_node.js:390:7) at startup (bootstrap_node.js:150:9) at bootstrap_node.js:505:3

dpa99c commented 7 years ago

Hmm, yes, I need to make it work for global installations too. For now use cordova-check-plugins@2 which invokes the CLI command directly.

thomaspeissl commented 7 years ago

Woah thanks for the fast response. cordova-check-plugins@2 works :+1:

dpa99c commented 7 years ago

Cool. I'll patch the v2 behaviour into v3 as a fallback if a local cordova installation is not found, and push it out as a v3 patch release.