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.

Yarn isn't working [8pt]

See original GitHub issue

Bug report

Expected behavior Users expect to be able to use yarn instead of npm.

Observed behavior yarn is not working because it doesn’t install local dependencies using symlinks. It copies the folder instead.

Possible solution We can use symlink-dir at frontity dev.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
luisherranzcommented, Apr 29, 2020

Impressive work @iamuchejude. Congratulations!! 😄

1reaction
luisherranzcommented, Apr 25, 2020

Oh, great discover @michalczaplinski.

The yarn team explicitly warns against using “aliases”

We are not using aliases.

They also support the link: and patch: protocols, which might or might not be what we are looking for.

No, but they also have portals and the is the exact same implementation than npm has for files! So it looks like that the yarn team decided to break compatibility with npm on purpose and what npm does with file: they do with portal:.

That’s really a shame because fixing this would be as simple as changing the package.json. But we can’t use both, and therefore we can’t support both.

Even though there are some options, like letting the user choose between npm or yarn on npx frontity create, they lead to problems in the future, when multiple people want to collaborate on the same project and they want to use different package managers.

We may use a preinstall script in the project and somehow check if the install command was called with yarn (I don’t know if that is possible) and if it was, change the package.json to portals and then on a postinstall script change it back to files, but that would complicate things for people wanting to use their own preinstall and postinstall scripts.

Well, it’s a shame that yarn has this functionality but with a different name. I don’t see a way right now to take advantage of it, so my opinion is to fix the links ourselves with the approach @iamuchejude is doing right now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Yarn global command not working - Stack Overflow
Doing a global install with npm has the expected result, and everything works. What am I missing with yarn? javascript · npm ·...
Read more >
LogRocket Blog - For Frontend Developers and Web App ...
Rethinking error tracking and product analytics. The current approach to delivering great digital experiences isn't working. It's time for a new solution.
Read more >
8-Point Round Ripple pattern by Rachel Lein - Ravelry
This pattern is very free spirited. You can use any worsted weight yarn you like and can mix and match colors to your...
Read more >
crochet star doily
Crochet Star DoilyThe pattern is very simple and the size of this doily can be customized according to your choice.
Read more >
Installation | Yarn
These instructions only cover Yarn versions prior to 2.0. ... It is recommended to install Yarn through the npm package manager, which comes...
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