You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Eugene Rychagov (JIRA)" <ji...@apache.org> on 2017/08/07 08:36:00 UTC

[jira] [Updated] (CB-13152) The command 'cordova prepare' breaks a path to an installed package

     [ https://issues.apache.org/jira/browse/CB-13152?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eugene Rychagov updated CB-13152:
---------------------------------
    Description: 
I made an example where I reproduce the issue each time: https://github.com/erychagov/cordova-prepare-issue[https://github.com/erychagov/cordova-prepare-issue].

1. Clone project
2. Make `npm i`
3. Make `ls -l node_modules`. Result (short version): `{{local-package -> ../local-package}}`
4. Make 'cordova prepare android`. 

*Actual*:
1. Output after step 4:
_{{Discovered plugin "local-package"}}_ in config.xml. Adding it to the project
Failed to restore plugin "local-package" from config.xml. You might need to try adding it again. Error: Failed to fetch plugin local-package@./local-package 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}}_

2. Output after a command `ls -l node_modules` (short version):
`{{local-package -> local-package}}`

3. `package.info` is modified.
before command:
`{{"local-package": "./local-package"}}`
After command:
`{{"local-package": "file:node_modules/local-package"}}`

*Expected*:
1. Output is empty after step 4.
2. Output after a command `ls -l node_modules` (short version):
`{{local-package -> ../local-package}}`
3. `package.info` is not modified.

  was:
I made an example where I reproduce the issue each time: https://github.com/erychagov/cordova-prepare-issue[https://github.com/erychagov/cordova-prepare-issue].

1. Clone project
2. Make `npm i`
3. Make `ls -l node_modules`. Result (short version): `{{local-package -> ../local-package}}`
4. Make 'cordova prepare android`. 

*Actual*:
1. Output after step 4:
_{{Discovered plugin "local-package" in config.xml. Adding it to the project
Failed to restore plugin "local-package" from config.xml. You might need to try adding it again. Error: Failed to fetch plugin local-package@./local-package 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}}_

2. Output after a command `ls -l node_modules` (short version):
`{{local-package -> local-package}}`

3. `package.info` is modified.
before command:
`{{"local-package": "./local-package"}}`
After command:
`{{"local-package": "file:node_modules/local-package"}}`

*Expected*:
1. Output is empty after step 4.
2. Output after a command `ls -l node_modules` (short version):
`{{local-package -> ../local-package}}`
3. `package.info` is not modified.


> The command 'cordova prepare' breaks a path to an installed package
> -------------------------------------------------------------------
>
>                 Key: CB-13152
>                 URL: https://issues.apache.org/jira/browse/CB-13152
>             Project: Apache Cordova
>          Issue Type: Bug
>    Affects Versions: cordova@7.0.0
>         Environment: OS: macOS Sierra 10.12.6 /Windows 10 Pro 1703
> node: 8.2.1
> npm: 5.3.0
> cordova: 7.0.1
>            Reporter: Eugene Rychagov
>            Priority: Minor
>
> I made an example where I reproduce the issue each time: https://github.com/erychagov/cordova-prepare-issue[https://github.com/erychagov/cordova-prepare-issue].
> 1. Clone project
> 2. Make `npm i`
> 3. Make `ls -l node_modules`. Result (short version): `{{local-package -> ../local-package}}`
> 4. Make 'cordova prepare android`. 
> *Actual*:
> 1. Output after step 4:
> _{{Discovered plugin "local-package"}}_ in config.xml. Adding it to the project
> Failed to restore plugin "local-package" from config.xml. You might need to try adding it again. Error: Failed to fetch plugin local-package@./local-package 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}}_
> 2. Output after a command `ls -l node_modules` (short version):
> `{{local-package -> local-package}}`
> 3. `package.info` is modified.
> before command:
> `{{"local-package": "./local-package"}}`
> After command:
> `{{"local-package": "file:node_modules/local-package"}}`
> *Expected*:
> 1. Output is empty after step 4.
> 2. Output after a command `ls -l node_modules` (short version):
> `{{local-package -> ../local-package}}`
> 3. `package.info` is not modified.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org