Skip to content

Typescript Issues with Workspaces and Webpack #2736

Answered by merceyz
wdfinch asked this question in Q&A
Discussion options

You must be logged in to vote

The reason it works without the workspace is explained here https://yarnpkg.com/features/pnp/#different-behaviours-based-on-workspace--not-a-workspace, you can see it fail in your non-workspace version if you add pnpFallbackMode: none to .yarnrc.yml.

The fix for both is to create a .yarnrc.yml file with the following content and running yarn install

packageExtensions:
  "@types/webpack-dev-server@*":
    peerDependencies:
      "@types/webpack": "*"

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@wdfinch
Comment options

@wdfinch
Comment options

@merceyz
Comment options

@wdfinch
Comment options

Answer selected by wdfinch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants