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] cannot install typescript as a dev dependency #2522

Closed
1 task
abh1kg opened this issue Feb 26, 2021 · 7 comments
Closed
1 task

[Bug] cannot install typescript as a dev dependency #2522

abh1kg opened this issue Feb 26, 2021 · 7 comments
Labels
bug Something isn't working reproducible This issue can be successfully reproduced

Comments

@abh1kg
Copy link

abh1kg commented Feb 26, 2021

  • I'd be willing to implement a fix

Describe the bug

yarn add typescript -D inside a yarn berry project fails with:

yarn add typescript -D
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0013: │ typescript@npm:4.2.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ typescript@patch:typescript@npm%3A4.2.2#builtin<compat/typescript>::version=4.2.2&hash=cc6730 can't be found in the cache and will be fetched from the disk
➤ YN0013: │ typescript@npm:4.2.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0066: │ typescript@patch:typescript@npm%3A4.2.2#builtin<compat/typescript>::version=4.2.2&hash=cc6730: Cannot apply hunk #6 (set enableInlineHunks for details)
➤ YN0000: └ Completed in 0s 659ms
➤ YN0000: Failed with errors in 0s 835ms

To Reproduce

await expect(packageJsonAndInstall({
  "name": "toolbelt",
  "version": "1.0.0",
  "devDependencies": {
    "typescript": "^4.2.2"
  }
 }
)).rejects.toThrow();

Screenshots

If applicable, add screenshots to help explain your problem.

Environment if relevant (please complete the following information):

  • OS: MacOS Big Sur 11.2.1
  • Node version: 12.20.1
  • Yarn version: 2.4.0

Additional context

Add any other context about the problem here.

@abh1kg abh1kg added the bug Something isn't working label Feb 26, 2021
@yarnbot

This comment has been minimized.

@yarnbot yarnbot added unreproducible This issue cannot be reproduced on master broken-repro The reproduction in this issue is broken and removed unreproducible This issue cannot be reproduced on master labels Feb 26, 2021
@yarnbot

This comment has been minimized.

@yarnbot

This comment has been minimized.

@yarnbot yarnbot added unreproducible This issue cannot be reproduced on master and removed broken-repro The reproduction in this issue is broken labels Feb 26, 2021
@yarnbot

This comment has been minimized.

@abh1kg
Copy link
Author

abh1kg commented Feb 26, 2021

On the other hand, adding typescript version 4.1.5 as a dev dependency works fine

@yarnbot yarnbot added reproducible This issue can be successfully reproduced and removed unreproducible This issue cannot be reproduced on master labels Feb 26, 2021
@yarnbot
Copy link
Collaborator

yarnbot commented Feb 26, 2021

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 0s 691ms
➤ YN0000: ┌ Fetch step
::group::Fetch step
➤ YN0013: │ No packages were cached - 3 packages had to be fetched
::endgroup::
➤ YN0000: └ Completed in 23s 45ms
➤ YN0000: ┌ Link step
::group::Link step
::endgroup::
➤ YN0000: └ Completed
➤ YN0000: Done in 23s 794ms
"
    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>:2:7)
    at /github/workspace/.yarn/cache/@arcanis-sherlock-npm-1.0.38-d4f5e2dbf3-63f998598d.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:56:19
    at executeInTempDirectory (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-1.0.38-d4f5e2dbf3-63f998598d.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:17:22)
    at Object.executeRepro (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-1.0.38-d4f5e2dbf3-63f998598d.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:24:18)
    at ExecCommand.execute (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-1.0.38-d4f5e2dbf3-63f998598d.zip/node_modules/@arcanis/sherlock/lib/commands/exec.js:25:59)
    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)

@arcanis
Copy link
Member

arcanis commented Feb 26, 2021

Duplicate of #2514

@arcanis arcanis marked this as a duplicate of #2514 Feb 26, 2021
@arcanis arcanis closed this as completed Feb 26, 2021
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