Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Imported shared package not resolving in workspace node_modules #7997

Open
simkessy opened this issue Mar 18, 2020 · 0 comments
Open

Imported shared package not resolving in workspace node_modules #7997

simkessy opened this issue Mar 18, 2020 · 0 comments

Comments

@simkessy
Copy link

Bug description

I set up workspaces pointing to an app and a common library. I'm imported the common library to my main app but it's resolving in the actual path of the common library and not the node_modules of the workspace:

Workspaces info:

❯ yarn workspaces info 
{
  "@services/common": {
    "location": "common",
    "workspaceDependencies": [],
    "mismatchedWorkspaceDependencies": []
  },
  "@services/zdqa": {
    "location": "zdqa/client",
    "workspaceDependencies": [
      "@services/common"
    ],
    "mismatchedWorkspaceDependencies": []
  }
}

When I import it I see this:

enter image description here

So instead of using the workspace version which should be in /services/node_modules/@services/common/, it's just find the actual project.

This is a problem because babel doesn't ignore it as it would if it was coming from node_modules.

What is the current behavior?
It's pulling from the common directory instead of node_modules

What is the expected behavior?
should be resolving fro node_modules so babel ignores it

Environment

  • Node Version: 12.13.1
  • Yarn v1 Version: 1.22.4
  • OS and version: Mac OSX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant