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 Workspace Support

See original GitHub issue

When trying to use this from an application in a yarn workspace I get the following error:

ENOENT: no such file or directory, lstat 'c:\project-root\packages\app-in-workspace\node_modules\@fortawesome\fontawesome-svg-core'

Issue Analytics

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

github_iconTop GitHub Comments

3reactions
ahawkinscommented, Dec 3, 2018

@mlwilkerson I opened a similar issue against another addon: https://github.com/kaermorchen/ember-cli-bootstrap-4/issues/34. That contains a reference solution from ember-bootstrap for correct file path resolution.

EDIT: for the time being you can use nohoist to keep modules in the expected directory. Here’s an example from my project:

{
  "name": "monorepo",
  "private": true,
  "workspaces": {
    "packages": [ ... ],
    "nohoist": [
      "**/@fortawesome/*"
    ]
  }
}

This example does not hoist any package under @fortawesome. This may be broad for your use case, so adjust accordingly if you need more granularity.

1reaction
bhirsch42commented, Feb 18, 2019

🎉 @jrjohnson It works! I no longer need to use nohoist on your branch. My test case is an ember app that depends on an ember addon in the same workspace, which in turn depends on ember-fontawesome. The app and addon also have parent directories.

All that to say, I think your solution is probably pretty robust. Thanks a bunch!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Workspaces - Yarn
Workspaces are a new way to set up your package architecture that's available by default starting from Yarn 1.0. It allows you to...
Read more >
Yarn workspaces — monorepo beginner's guide - Medium
Yarn Workspaces is a feature that allows users to install dependencies from multiple package.json files in subfolders of a single root package.json file,...
Read more >
Scaling out JavaScript Monorepos with Yarn Workspaces
The first thing to do is set up the workspaces. Start by ensuring that you're running the latest Yarn version. ... Next, initialize...
Read more >
Yarn Workspaces: Organize Your Project's Codebase Like A Pro
Yarn workspaces let you organize your project codebase using a monolithic repository (monorepo). In this article, Jorge explains why they're ...
Read more >
Yarn workspace tutorial, introduction and cheatsheet
If both Web Service and Web UI have some common code, like email, phone validation, validating token etc. then we can abstract it...
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