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.

[Bug] `preferInteractive` has no effect

See original GitHub issue

Describe the bug

According to the docs, preferInteractive: true should imply --interactive flag on every yarn add, but adding preferInteractive to yarnrc.yml has no effect.

To Reproduce

Reproduction
await packageJson({ name: 'root', workspaces: ['packages/*'] })
await packageJson({ name: 'package-a', dependencies: { typescript: '3.8' } }, 'packages/package-a')

await expect(yarn('add', 'typescript', '--interactive', { timeout: 60000 })).rejects.toThrow(`Command failed`) // failed as expected because of interactive mode
require('fs').writeFileSync('.yarnrc.yml', 'preferInteractive: true')
await expect(yarn('add', 'typescript',                  { timeout: 60000 })).rejects.toThrow(`Command failed`) // it should also fail because of interactive mode, but succeeded as if there is no preferInteractive

Environment

  • Yarn version 2.0.0-rc.36

Additional context

I cannot find any preferInteractive text in this repo other than docs.

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
paul-soporancommented, Jul 9, 2020

🤔 Looks like yet another one of those “not yet implemented, but somehow documented” features that somehow somebody took the time document. 😅 I’m going to implement it soon 👍

0reactions
yarnbotcommented, Jul 9, 2020

This issue reproduces on master:

Error: expect(received).rejects.toThrow()

Received promise resolved instead of rejected
Resolved to value: "➤ YN0000: ┌ Resolution step
::group::Resolution step
::endgroup::
➤ YN0000: └ Completed in 0.42s
➤ YN0000: ┌ Fetch step
::group::Fetch step
➤ YN0013: │ No packages were cached - 3 packages had to be fetched
::endgroup::
➤ YN0000: └ Completed in 41.26s
➤ YN0000: ┌ Link step
::group::Link step
::endgroup::
➤ YN0000: └ Completed
➤ YN0000: Done in 41.74s
"
    at expect (/github/workspace/.yarn/cache/expect-npm-24.8.0-8c7640c562-0ac41999f0.zip/node_modules/expect/build/index.js:138:15)
    at module.exports (evalmachine.<anonymous>:7:7)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async /github/workspace/.yarn/cache/@arcanis-sherlock-npm-1.0.38-d4f5e2dbf3-63f998598d.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:56:13
    at async executeInTempDirectory (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-1.0.38-d4f5e2dbf3-63f998598d.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:17:16)
    at async Object.executeRepro (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-1.0.38-d4f5e2dbf3-63f998598d.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:24:12)
    at async ExecCommand.execute (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-1.0.38-d4f5e2dbf3-63f998598d.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-a57989414f.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-a57989414f.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-a57989414f.zip/node_modules/clipanion/lib/advanced/Cli.js:83:28)
Read more comments on GitHub >

github_iconTop Results From Across the Web

Error Codes | Yarn - Package Manager
A list of Yarn's error codes with detailed explanations. ... If relevant, they can use optional peer dependencies to this effect.
Read more >
Do pediatric residents prefer interactive learning? Educational ...
PDF | The volume of information that physicians must learn is increasing; yet, trainee educational time is limited.
Read more >
Cartoon Tools for Tapping Your Inner Disney
But if you're interested in making stop-motion animations with a little more control, you may prefer Interactive Universe's Lapse It app ...
Read more >
GAN'SDA Wrap: Geographic And Network Structured Data on ...
However, the effects of such interaction have not previously been evaluated. ... H1-1: Interactive has a lower error rate than all static map...
Read more >
Gamified flipped learning: Students' motivation, engagement and ...
They prefer interactive environments ... Huang et al., 2019) and it has no effect (Mese & Dursun, 2019; Tan & Hew, 2016). Therefore,...
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