Skip to content

Workspaces: local copy of package is created when using it via file: in package.json #5379

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

Open
artaommahe opened this issue Feb 20, 2018 · 1 comment
Assignees
Labels

Comments

@artaommahe
Copy link

Do you want to request a feature or report a bug?
bug

Project structure

libs/
  base/
packages/
  frontend/
    package.json

Workspaces config

  "workspaces": [
    "packages/*",
    "libs/*"
  ],

frontend/package.json

    "base": "file:../../libs/base",

What is the current behavior?
packages/frontend/node_modules/base is created and contains copy of libs/base folder

What is the expected behavior?
No packages/frontend/node_modules/base folder, symlinked one from node_modules/base is used

Please mention your node.js, yarn and operating system version.
Yarn 1.3.2
Node 8.7.0
Windows 10

@ghost ghost assigned torifat Feb 20, 2018
@ghost ghost added the triaged label Feb 20, 2018
@artaommahe
Copy link
Author

it can be solved like this (thx to @rally25rs)

"base": "*",

but it's not obvious and i think there is still bug with file: usage

qdot added a commit to buttplugio/buttplug-js that referenced this issue Feb 22, 2019
According to yarnpkg/yarn#5379, * should be
used instead of file links for referring to local dependencies,
otherwise file links are installed into package local node_modules. No
idea why that happens, but this seems to fix it.
qdot added a commit to buttplugio/buttplug-js that referenced this issue Feb 22, 2019
According to yarnpkg/yarn#5379, * should be
used instead of file links for referring to local dependencies,
otherwise file links are installed into package local node_modules. No
idea why that happens, but this seems to fix it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants