bayssmekanique opened a new issue #546:
URL: https://github.com/apache/cordova-cli/issues/546
# Bug Report
## Problem
`npm` version `6` worked as expected, but since upgrading to `7`, local
plugins fail to install correctly.
There is a plugin that is located in a sibling directory that gets
referenced in the `config.xml` file as `<plugin
name="cordova-plugin-a500-interface" spec="../../plugins/a500Interface"/>`.
### What is expected to happen?
On version `6`, a symlink is created in the `node_modules` directory
pointing to the plugins directory, a copy of the directory is placed in the
`plugins` directory, and the `prepare` step finishes without issue.
### What does actually happen?
On version `7`, this fails in the `prepare` step with this error:
```sh
Discovered plugin "cordova-plugin-a500-interface". Adding it to the project
Failed to restore plugin "cordova-plugin-a500-interface". You might need to
try adding it again. Error: CordovaError: CordovaError: Could not determine
package name from output:
up to date, audited 124 packages in 588ms
8 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
```
The symlink is created in the `node_modules` directory, but no copy is
placed in the plugins directory.
## Information
<!-- Include all relevant information that might help understand and
reproduce the problem -->
I suspect this is an issue with the parsing of the output from `npm`, since
the actual symlink is being created correctly. I have tested this with
multiple version of `npm` (`6.14.4`, `6.14.8`, `7.0.8`, `7.0.14`, `7.0.15`,
`7.1.2`), the version `6` consistently worked and the version `7` consistently
failed.
### Command or Code
<!-- What command or code is needed to reproduce the problem? -->
`npx cordova prepare`
### Environment, Platform, Device
<!-- In what environment, on what platform or on which device are you
experiencing the issue? -->
Windows 10 Pro (tested across 3 devices)
### Version information
Powershell `5.1.19041.610`
Node (`14.0.0`, `14.2.0`, `14.14.0`, `15.4.0`)
Cordova (`9.0.0`, `10.0.0`)
Cordova-Android `9.0.0`
## Checklist
<!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
I have been through the uninstall/clear/reinstall steps on several machines
trying to solve this problem and I'm certain it's related to the npm version
based on the repeatability I observed.
- [X] I searched for existing GitHub issues
- [X] I updated all Cordova tooling to most recent version
- [X] I included all the necessary information above
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]