berry icon indicating copy to clipboard operation
berry copied to clipboard

[Bug?]: yarn workspaces pnp vs node-modules linker

Open alex-enchi opened this issue 3 years ago • 1 comments

Self-service

  • [ ] I'd be willing to implement a fix

Describe the bug

When using workspaces with pnp linker for freshly boostrapped applications some imports do not work. But work normally with node-modules linker

It seems that builders can't find some linked dependencies.

Getting errors like

[eslint] Failed to load config "react-app" to extend from.

and

➤ YN0000:
➤ YN0000:     tsconfig.json:2:13:
➤ YN0000:       2 │   "extends": "@vue/tsconfig/tsconfig.web.json",
➤ YN0000:

To reproduce

See readme in sample repository

  1. clone repository
  2. remove .yarnc.yml (yarn can't read that file and make setup properly)
  3. run yarn set version stable
  4. run yarn plugin import workspace-tools
  5. yarn to install dependencies
  6. yarn build to try and build <- that step fails

Environment

System:
    OS: macOS 13.0
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
  Binaries:
    Node: 16.14.0 - /private/var/folders/k7/wgs8x28d09x3nhhl81byd5z40000gn/T/xfs-cf108b83/node
    Yarn: 3.2.2 - /private/var/folders/k7/wgs8x28d09x3nhhl81byd5z40000gn/T/xfs-cf108b83/yarn
    npm: 8.12.2 - ~/Library/Caches/fnm_multishells/40664_1658829214578/bin/npm

Additional context

When generating more complicated setups with more dependencies builds are also failing with different web pack peer dependencies as well.

alex-enchi avatar Jul 26 '22 12:07 alex-enchi

The same error occurred. ( vu3 + webpack 5 + typescript 4.7.4 ) in yarn berry

image

Q: How does yarn berry (3.2.2) refer to another( @vue/tsconfig ) tsconfig?

m-fire avatar Aug 01 '22 23:08 m-fire

Hi! 👋

This issue looks stale, and doesn't feature the reproducible label - which implies that you didn't provide a working reproduction using Sherlock. As a result, it'll be closed in a few days unless a maintainer explicitly vouches for it or you edit your first post to include a formal reproduction (you can use the playground for that).

Note that we require Sherlock reproductions for long-lived issues (rather than standalone git repositories or similar) because we're a small team. Sherlock gives us the ability to check which bugs are still affecting the master branch at any given point, and decreases the amount of code we need to run on our own machines (thus leading to faster bug resolutions). It helps us help you! 😃

If you absolutely cannot reproduce a bug on Sherlock (for example because it's a Windows-only issue), a maintainer will have to manually add the upholded label. Thanks for helping us triaging our repository! 🌟

yarnbot avatar Sep 01 '22 00:09 yarnbot