Skip to content

[Bug] Yarn 2 failing to install package #5

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
dzintars opened this issue Feb 3, 2020 · 4 comments
Closed

[Bug] Yarn 2 failing to install package #5

dzintars opened this issue Feb 3, 2020 · 4 comments

Comments

@dzintars
Copy link

dzintars commented Feb 3, 2020

Decided to try setup project with Yarn 2, but this package fails to install.
Not sure is it related to plugin or Yarn itself, but i will report it.
"rollup": "^1.31.0", is installed at the time of installing this package.

Original issue can be found there.

yarn add -D rollup-plugin-minify-html-literals
➤ YN0000: ┌ Resolution step
➤ YN0002: │ yarn2-test@workspace:. doesn't provide rollup@^0.65.2 || ^1.0.0 requested by rollup-plugin-minify-html-literals@npm:1.2.2
➤ YN0000: └ Completed in 1.95s
➤ YN0000: ┌ Fetch step
➤ YN0013: │ typescript@patch:typescript@npm%3A2.9.2#builtin<compat/typescript>::version=2.9.2&hash=226bd1 can't be found in the cache and will be fetched from the disk
➤ YN0001: │ Error: typescript@patch:typescript@npm%3A2.9.2#builtin<compat/typescript>::version=2.9.2&hash=226bd1: Cannot apply hunk #1
    at c (/usr/local/lib/node_modules/yarn/bin/yarn.js:58:888149)
    at processTicksAndRejections (internal/process/task_queues.js:94:5)
    at async /usr/local/lib/node_modules/yarn/bin/yarn.js:58:890280
    at async o (/usr/local/lib/node_modules/yarn/bin/yarn.js:58:887432)
    at async Object.t.applyPatchFile (/usr/local/lib/node_modules/yarn/bin/yarn.js:58:890253)
    at async t.PatchFetcher.patchPackage (/usr/local/lib/node_modules/yarn/bin/yarn.js:58:887187)
    at async /usr/local/lib/node_modules/yarn/bin/yarn.js:58:886444
    at async /usr/local/lib/node_modules/yarn/bin/yarn.js:36:569449
    at async /usr/local/lib/node_modules/yarn/bin/yarn.js:36:569392
    at async /usr/local/lib/node_modules/yarn/bin/yarn.js:36:570734
➤ YN0000: └ Completed in 7.89s
➤ YN0000: Failed with errors in 9.84s
@asyncLiz
Copy link
Owner

asyncLiz commented Feb 3, 2020

I haven't used Yarn 2. Does it support range1 || range2 version syntax?

@arcanis
Copy link

arcanis commented Feb 3, 2020

It does - the problem was that your package has a dependency on an incompatible version fo typescript, and Yarn 2 didn't behave well.

This is now fixed on our side, but it's still fairly curious - very few packages need to have a regular dependency on it (by opposition to a dev dependency). Is it expected here?

@dzintars
Copy link
Author

dzintars commented Feb 3, 2020

Currently fixed as @arcanis was suggesting by adding

}
  "resolutions": {
    "typescript": "3.7.5"
  }
}

in package.json

@asyncLiz
Copy link
Owner

asyncLiz commented Feb 3, 2020

@arcanis yes, this package directly depends on typescript at runtime since it uses TS to parse JS/TS into an AST to identify where template literals are.

I've made asyncLiz/parse-literals#8 to update TS to v3 for the library that needs it. Thanks for digging into this!

@asyncLiz asyncLiz closed this as completed Feb 3, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants