Dependencies are wiped on each step of project creation with cordova-lib and NPM 7 #868
Open
3 tasks done
Labels
info-needed
Further information is requested
Bug Report
Problem
What is expected to happen?
For a cordova project created through cordova-lib node api, with npm@7,
we expect the npm packages required by each cordova step/command to be stored and cumulated in /node_modules/
like what's done using npm@6 or with cordova-cli itself with npm@6 and npm@7.
What does actually happen?
Project creation has correct /node_modules/ and runs fine for
In those 3 cases, the order to add plugins and platform does not matter: plugins first and platform after them, or the opposite, platform first and then plugins.
😢 Using cordova-lib with npm@7 results in incomplete /node_modules/ and so possibly failing project creation (like when a plugin after_prepare hook script called during
cordova platform add
does not find one of its own dependencies).Information
Again only since Npm 7, each step is fetching its packages correctly inside /node_modules/ but it is also like wiping its content first.
Each call to
await cordova.plugin('add', pluginName);
orawait cordova.platform('add', platformName);
will result in its content to have only new deps for current specific plugin or platform.Command or Code
(simplified version of my code ; I am working on a basic and easily reusable project to share here soon)
will give such failure
Environment, Platform, Device
Version information
Checklist
The text was updated successfully, but these errors were encountered: