You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do you want to request a feature or report a bug?
A bug.
What is the current behavior?
The install fails when a local dependency is added via a path where the path contains a symlink. The install fails with an cache error:
error An unexpected error occurred: "ENOENT: no such file or directory, scandir '/home/rohea/.cache/yarn/v4/npm-local-dependency-1.0.0-b7aa11f4-7170-4500-b18a-0d8c0dd25a47-1554094447449/node_modules/local-dependency'".
And the hash (i.e. b7aa11f4-7170-4500-b18a-0d8c0dd25a47-1554094447449) always changes on different runs of yarn install.
If the current behavior is a bug, please provide the steps to reproduce.
yarn install v1.15.2
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
error An unexpected error occurred: "ENOENT: no such file or directory, scandir '/home/rohea/.cache/yarn/v4/npm-local-dependency-1.0.0-b7aa11f4-7170-4500-b18a-0d8c0dd25a47-1554094447449/node_modules/local-dependency'".
info If you think this is a bug, please open a bug report with the information provided in "/home/rohea/yarn-path-install-bug/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
I did not find any workaround that would utilize the symlinks @emodric. Due to the way the path dependencies work in npm/yarn makes them a bit less useful anyway, since the files are copied to the node_modules instead of being used directly from the path.
We ended up setting things up so that the actual dependency folder is fully copied to the dependency path and then yarn link is used to setup so that the code is actually used from where we want. Works for your use case, but is not pretty.
I would still like to see this resolved as now it's a kludgy hack.
Do you want to request a feature or report a bug?
A bug.
What is the current behavior?
The install fails when a local dependency is added via a path where the path contains a symlink. The install fails with an cache error:
And the hash (i.e.
b7aa11f4-7170-4500-b18a-0d8c0dd25a47-1554094447449
) always changes on different runs ofyarn install
.If the current behavior is a bug, please provide the steps to reproduce.
yarn install
What is the expected behavior?
Yarn would install correctly. The reproducing repository contains a different branch https://github.com/hniirane/yarn-path-install-bug/tree/working-local-dependency that works as expected since the dependency is not loaded via a symlink.
Please mention your node.js, yarn and operating system version.
The text was updated successfully, but these errors were encountered: