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?]: TS 4.9.3 patch doesn't work with yarn@3.2.4 #5066

Closed
1 task
wegry opened this issue Nov 15, 2022 · 7 comments
Closed
1 task

[Bug?]: TS 4.9.3 patch doesn't work with yarn@3.2.4 #5066

wegry opened this issue Nov 15, 2022 · 7 comments
Labels
bug Something isn't working unreproducible This issue cannot be reproduced on master

Comments

@wegry
Copy link

wegry commented Nov 15, 2022

Self-service

  • I'd be willing to implement a fix

Describe the bug

Installing typescript@4.9.3 with yarn@3.2.4 results in many spurious type errors when tsc is run.

To reproduce

await packageJsonAndInstall({
    dependencies: {
        typescript: '4.8.4'
    }
})

await packageJsonAndInstall({
    dependencies: {
        typescript: '4.9.3'
    }
})

Environment

System:
    OS: macOS 13.0.1
    CPU: (8) arm64 Apple M1 Pro
  Binaries:
    Node: 18.12.1 - /private/var/folders/k5/x6ks_wdd1b31y221zccrmbtm0000gn/T/xfs-5f8b4758/node
    Yarn: 3.2.4 - /private/var/folders/k5/x6ks_wdd1b31y221zccrmbtm0000gn/T/xfs-5f8b4758/yarn
    npm: 8.19.2 - ~/.nvm/versions/node/v18.12.1/bin/npm

Additional context

Might be similar to #4915. Running yarn add typescript@4.9.3 when 4.8.4 is installed results in...

➤ YN0000: ┌ Fetch step
➤ YN0013: │ typescript@npm:4.9.3 can't be found in the cache and will be
➤ YN0013: │ typescript@patch:typescript@npm%3A4.9.3#~builtin<compat/types
➤ YN0013: │ typescript@npm:4.9.3 can't be found in the cache and will be
➤ YN0066: │ typescript@patch:typescript@npm%3A4.9.3#~builtin<compat/typescript>::version=4.9.3&hash=701156: Cannot apply hunk #8
➤ YN0019: │ typescript-npm-4.8.3-7c28a78612-8286a5edca.zip appears to be
➤ YN0019: │ typescript-patch-2a94c71984-2222d2382f.zip appears to be unus
➤ YN0000: └ Completed in 18s 375ms
@wegry wegry added the bug Something isn't working label Nov 15, 2022
@yarnbot yarnbot added the unreproducible This issue cannot be reproduced on master label Nov 15, 2022
@yarnbot

This comment has been minimized.

2 similar comments
@yarnbot

This comment has been minimized.

@yarnbot
Copy link
Collaborator

yarnbot commented Nov 15, 2022

We couldn't reproduce your issue (all the assertions passed on master).

@merceyz merceyz pinned this issue Nov 15, 2022
@merceyz
Copy link
Member

merceyz commented Nov 15, 2022

Fixed in #5020 and released in v3.3.0.

yarn set version berry && yarn install

Fixed in #5020, we'll make a new v3 release soon but until then you can use either a v4 canary build or v3 from sources.

yarn set version canary
yarn set version from sources --branch merceyz/release/3.3.0

@merceyz merceyz closed this as completed Nov 15, 2022
@elmpp
Copy link
Contributor

elmpp commented Nov 16, 2022

yarn set version canary

results in my getting

constraintsPath Cannot redefine settings "constraintsPath"

@merceyz
Copy link
Member

merceyz commented Nov 16, 2022

The plugins are included by default in v4 so you'll need to remove them from .yarnrc.yml.

@arcanis
Copy link
Member

arcanis commented Nov 16, 2022

I just released the 3.3.0 so that should also be an option.

Oblosys added a commit to Oblosys/react-hook-tracer that referenced this issue Nov 17, 2022
Update commands: `yarn set version berry && yarn`. This fixes an issue with typescript@4.9.3 (see yarnpkg/berry#5066).
@merceyz merceyz unpinned this issue Dec 8, 2022
@yarnpkg yarnpkg locked as resolved and limited conversation to collaborators Dec 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working unreproducible This issue cannot be reproduced on master
Projects
None yet
Development

No branches or pull requests

5 participants