[ 
https://issues.apache.org/jira/browse/CB-14150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16518194#comment-16518194
 ] 

Austin France edited comment on CB-14150 at 6/20/18 2:26 PM:
-------------------------------------------------------------

$ cordova create myApp org.apache.cordova.myApp myApp
$ cd myApp
$ cordova plugin add 
[https://github.com/redskyit/cordova-plugin-background-geolocation.git]
$ cordova platform add android

Fails


was (Author: mehuge):
$ cordova create myApp org.apache.cordova.myApp myApp
$ cd myApp
$ cordova plugin add 
[https://github.com/redskyit/cordova-plugin-background-geolocation.git]
$ cordova plugin add ../plugins/redsky-firebase

Works


$ cd myApp
$ rm -rf platforms plugins 
$ cordova plugin add 
[https://github.com/redskyit/cordova-plugin-background-geolocation.git]
$ cordova plugin add ../plugins/redsky-firebase

Fails



$ cd myApp
$ rm -rf platforms plugins node_modules package.json package-lock.json
$ cordova plugin add 
[https://github.com/redskyit/cordova-plugin-background-geolocation.git]
$ cordova plugin add ../plugins/redsky-firebase

Works

So, there is a simple work-around, remove node_modules and package.json as well 
as platforms and plugins 

> Error: CordovaError: Failed to get absolute path to installed module
> --------------------------------------------------------------------
>
>                 Key: CB-14150
>                 URL: https://issues.apache.org/jira/browse/CB-14150
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-fetch
>    Affects Versions: [email protected]
>            Reporter: Austin France
>            Priority: Major
>
> [email protected]
> I have the following situation when building my cordova project from clean.  
> By clean I mean
> rm -rf platforms plugins
> So I have my config.xml prepared (which I generate from a template) and I sit 
> in the project directory and I do
> _$ cordova plugin add 
> [https://github.com/redskyit/cordova-plugin-background-geolocation.git]_
>  _$ cordova plugin add ../plugins/redsky-firebase_
> (the real commands include variables, but for purposes of reproducing this 
> issue, they are not required)
> The second plugin add fails with: 
>  (where ... is /usr/local/lib/node_modules/cordova/node_modules)
> {code:java}
> Error: CordovaError: Failed to get absolute path to installed module
>      at Function.getPath (.../cordova-fetch/index.js:203:15)
>      at .../cordova-fetch/index.js:102:35
>      at _fulfilled (${NPM}/cordova-fetch/node_modules/q/q.js:854:54)
>      at self.promiseDispatch.done 
> (.../cordova-fetch/node_modules/q/q.js:883:30)
>      at Promise.promise.promiseDispatch 
> (.../cordova-fetch/node_modules/q/q.js:816:13)
>      at .../cordova-fetch/node_modules/q/q.js:624:44
>      at runSingle (.../cordova-fetch/node_modules/q/q.js:137:13)
>      at flush (.../cordova-fetch/node_modules/q/q.js:125:13)
>      at process._tickCallback (internal/process/next_tick.js:150:11) 
> {code}
> I added a console.log to getPath in cordova-fetch index.js and the output is 
> as follows:
> $ cordova plugin add 
> [https://github.com/redskyit/cordova-plugin-background-geolocation.git
>  getPath: 
> /Users/adf/.../RMCv2/node_modules/cordova-plugin-background-geolocation
>  _$ cordova plugin add ../plugins/redsky-firebase_
>  getPath: 
> /Users/adf/.../RMCv2/node_modules/cordova-plugin-background-geolocation
> Thats right, the second plugin add is using the first plugins path, and this 
> fails.
> Further more, if I run the second cordova plugin add command again, it then 
> works with getPath using the correct path this time.
> _$ cordova plugin add ../plugins/redsky-firebase_
>  getPath: /Users/adf/.../RMCv2/node_modules/redsky-firebase
> If I reverse the order in which I install plugins, it works ok
> _$ cordova plugin add ../plugins/redsky-firebase_
>  getPath: /Users/adf/.../RMCv2/node_modules/redsky-firebase
>  $ cordova plugin add 
> [https://github.com/redskyit/cordova-plugin-background-geolocation.git
>  getPath: 
> /Users/adf/.../RMCv2/node_modules/cordova-plugin-background-geolocation



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to