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

[Bug?]: Circular symbollink when nodeLinker = node-modules and installConfig.hoistingLimits = dependencies #3409

Closed
1 task
cuyl opened this issue Sep 9, 2021 · 5 comments
Labels
bug Something isn't working reproducible This issue can be successfully reproduced

Comments

@cuyl
Copy link
Contributor

cuyl commented Sep 9, 2021

Self-service

  • I'd be willing to implement a fix

Describe the bug

Found Circular symbollink while nodeLinker = node-modules and installConfig.hoistingLimits = dependencies

To reproduce

This is my reproduction case:

const {promises: {realpath}} = require(`fs`);
await packageJson({
  "name": "root",
  "private": true,
  "version": "1.0.0",
  "main": "index.js",
  "workspaces": [
    "packages/*"
  ]
});

await packageJson({
  "name": "circular-link",
  "version": "1.0.0",
  "main": "index.js",
  "installConfig": {
    "hoistingLimits": "dependencies"
  }
}, { cwd: './packages/circular-link'});
await yarn(...`config set nodeLinker node-modules`.split(` `));
await yarn(`install`);
await expect(await realpath(`./packages/circular-link/node_modules/circular-link`) === await realpath(`./packages/circular-link`)).toBe(false);

Environment

System:
OS: macOS 10.15.7
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Binaries:
Node: 12.22.5 - /private/var/folders/x9/m_y2fpmn1wgcd33f1y0tdhgr0000gq/T/xfs-b955e0c3/node
Yarn: 3.1.0-rc.2.dev - /private/var/folders/x9/m_y2fpmn1wgcd33f1y0tdhgr0000gq/T/xfs-b955e0c3/yarn
npm: 6.14.14 - ~/.nvm/versions/node/v12.22.5/bin/npm

Additional context

No response

@cuyl cuyl added the bug Something isn't working label Sep 9, 2021
@yarnbot

This comment has been minimized.

@yarnbot yarnbot added reproducible This issue can be successfully reproduced unreproducible This issue cannot be reproduced on master and removed reproducible This issue can be successfully reproduced labels Sep 9, 2021
@yarnbot

This comment has been minimized.

@yarnbot yarnbot added reproducible This issue can be successfully reproduced and removed unreproducible This issue cannot be reproduced on master labels Sep 9, 2021
@yarnbot

This comment has been minimized.

@cuyl cuyl changed the title [Bug?]: Circular symbollink when using nodeLinker = node-modules and installConfig.hoistingLimits = dependencies [Bug?]: Circular symbollink when nodeLinker = node-modules and installConfig.hoistingLimits = dependencies Sep 9, 2021
@yarnbot
Copy link
Collaborator

yarnbot commented Sep 9, 2021

This issue reproduces on master:

Error: expect(received).toBe(expected) // Object.is equality

Expected: false
Received: true
    at module.exports (evalmachine.<anonymous>:23:132)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async /github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.2-91650a2501-627bee24a7.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:56:13
    at async executeInTempDirectory (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.2-91650a2501-627bee24a7.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:17:16)
    at async Object.executeRepro (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.2-91650a2501-627bee24a7.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:24:12)
    at async ExecCommand.execute (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.2-91650a2501-627bee24a7.zip/node_modules/@arcanis/sherlock/lib/commands/exec.js:25:38)
    at async ExecCommand.validateAndExecute (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-91cf93ba72.zip/node_modules/clipanion/lib/advanced/Command.js:161:26)
    at async Cli.run (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-91cf93ba72.zip/node_modules/clipanion/lib/advanced/Cli.js:74:24)
    at async Cli.runExit (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-91cf93ba72.zip/node_modules/clipanion/lib/advanced/Cli.js:83:28)

@arcanis
Copy link
Member

arcanis commented Sep 9, 2021

Duplicate of #3256; candidate fix is #3332 (not merged yet)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working reproducible This issue can be successfully reproduced
Projects
None yet
Development

No branches or pull requests

3 participants