You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2021/09/10 07:47:15 UTC
[GitHub] [cordova-lib] erisu commented on pull request #874: fix: Platforms restored from both dev and normal dependencies.
erisu commented on pull request #874:
URL: https://github.com/apache/cordova-lib/pull/874#issuecomment-916703741
Can you explain why you have the platform package defined in both `dependencies` and `devDependencies`?
Have it defined in both is not considered as a valid npm package...
For example, if you run the following commands
```shell
mkdir testProject
npm init -y
npm i cordova-android
npm i -D cordova-android
```
You will see that there is only one entry for `cordova-android`. The npm process would just move the package from the `dependencies` list to `devDependencies`.
That is why cordova-lib is using an `if else` statement. It checks for one and if it doesn't exist then it should be in the other.
I think the solution is to delete one of them, and preferably keep it in `devDependencies` as the package is not something bundled with the app.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org