question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Please restore `--nofetch` flag to support Yarn

See original GitHub issue

We’re using Yarn and without --nofetch our node_modules folder gets screwed by npm (invoked by cordova-fetch). We would really really like --nofetch back to be able to work.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:31 (12 by maintainers)

github_iconTop GitHub Comments

7reactions
dpoguecommented, Oct 12, 2018

I would love to do that, but people need to be able to run commands like cordova platform add and cordova plugin add, and that needs to add the platform/plugin to package.json and install it into node_modules. We need to use npm to do that.

What we can do (and I’m working on this) is to not run any package management commands as part of cordova prepare. We should tell people to run npm/yarn/pnpm themselves and then look for what we need in node_modules, and warn if we can’t find it.

5reactions
leandro-manifestocommented, Oct 11, 2018

Hello guys, here at my company we are using Cordova (and Ionic) to make some mobile apps.

We have a Jenkins agent doing Android builds with the following steps:

  • npm install
  • rm -rf platforms/ plugins/
  • cordova prepare android
  • cordova compile android --release

We have a mix of registry, git and local plugins and currently the prepare step takes a long time. From what I could understand cordova uses npm to install everything again, even though the install step already placed everything inside node_modules.

I tried using Yarn and pinning cordova-fetch to the patched version (apache/cordova-fetch@10870103c0d2a58ce0d8b91cf14053dd0c315b20) but npm is still being called for git and local dependencies.

I can’t help but wonder if it wouldn’t be better if cordova ditched the dependency manager role and only used the node resolution algorithm to find the referenced plugins (and platforms), allowing the user to pick whatever package manager he prefers.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[GitHub] [cordova-cli] QuentinFarizon commented ... - The Mail Archive
... commented on issue #303: Please restore `--nofetch` flag to support Yarn ... hook that restores node_modules after cordova has finished messing with...
Read more >
Tools Released! - Apache Cordova
Cordova 8 is making our builds almost impossible (due to --no-fetch removal). We are using yarn! Yarn is popular, please please support yarn!...
Read more >
ses | Yarn - Package Manager
SES is hardened JavaScript. SES stands for fearless cooperation. This package is a SES shim for JavaScript features proposed to ECMA TC-39. Hardened...
Read more >
Unable to set engine-strict flag with yarn - node.js
but it led to following error when I run yarn install ... run "yarn config -v" to see the list of settings supported...
Read more >
DROPS Baby Merino - Superwash treated extra fine merino ...
DROPS Baby Merino is a 100% extra fine merino wool yarn that's super soft, ... Please be aware that the colours shown may...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found