-
Notifications
You must be signed in to change notification settings - Fork 244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cordova doesn't work with NPM 7 #859
Comments
Thanks for bringing attention to us. This part of the codebase that handles fetching dependencies is actually part of I've ran
Only |
I've also observed the same error on other commands that involves installing npm packages, such as |
|
There are several failures in |
It appears that npm v7 doesn't print out a list of things that it installs (either as text or with the As it currently stands, Cordova support for npm v7 is not going to be quick or easy. |
Thanks for investigating @dpogue. It's really bad news for us if there's no way to get the installed package's name from the npm output. That might mean we have to change how we call |
One approach would be to first resolve everything we need to manifests (which contain the package name) and tarballs, then install everything in one go. Our custom plugin dependency resolution will probably be a challenge, as usual. Here's an example on how to get a manifest with npm's If done properly this has the potential to greatly improve our prepare speed in various scenarios, so there might come something good of it. |
I looks like there's an open PR to address support for npm@7 but no activity since October. Is this slated for an upcoming release? |
I believe npm/cli#2339 is the main blocker for apache/cordova-fetch#91 |
Well, currently it looks as if npm/cli#2339 is seen as an intended change in behavior for npm v7. I'm not entirely sure if this change would affect anything else than our current test-fixtures setup in cordova-lib. I would have to re-evaluate the situation given the latest comments from that issue to decide how to best address this. Unfortunately I'm a bit low on spare time right now. However, the implementation of apache/cordova-fetch#91 would not change, regardless of npm/cli#2339. So we could push to integrate and release this (as a minor or fix release to cordova-fetch) and then it would be available for people. Then we could still figure out what to do about our tests in lib. |
I just merged apache/cordova-fetch#91. If we release the current master of However, I won't be able to do the release myself. So if someone could handle that task, that would be great. |
A few days ago, we released |
Just use below command :
|
This issue still seems to be present in the Cordova 12.0.0 (cordova-lib@12.0.1). Cordova Packages
Environment:
Any help to fix this would be appreciated! |
This a 3 year old issue was resolved and was related to changes introduced NPM 7 and was proven to be addressed in cordova-fetch@3.0.1. If you're having an issue with the current CLI, then it will be best for you to create a new issue with updated/current information so that it can be tracked properly. |
Bug Report
I've been running the new npm version (7) and this is the first project that I had problems with.
Problem
Running the following commands gives an error:
What is expected to happen?
Installation of
cordova-android@^9.0.0
What does actually happen?
Information
Like I stated before, its specific to npm 7, the new version that isn't out yet but its about to be
https://github.blog/2020-10-13-presenting-v7-0-0-of-the-npm-cli/
https://blog.npmjs.org/post/626173315965468672/npm-v7-series-beta-release-and-semver-major
Command or Code
npm i -g npm@next-7
followed by
cordova platform rm android && cordova platform add android --verbose
the usage of npm 7 can be reverted with:
npm i -g npm@6
which installs 6.x.x
Environment, Platform, Device
Version information
Checklist
The text was updated successfully, but these errors were encountered: