HMR errors when using yarn #422

Closed
opened 2025-08-09 17:16:14 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @lyphtec on 9/15/2017

Hi,

I get HMR errors running sample React app with latest version:

Versions

> yarn --version
1.0.2
> dotnet --version
2.0.2-vspre-006949
> node --version
v8.5.0
> npm --version
5.3.0

Steps to reproduce

  • dotnet new react
  • yarn install
  • dotnet run (in dev mode)

Errors from Chrome console

[HMR] connected
client.js:160 [HMR] bundle has 678 errors
client.js:161 [at-loader] ./node_modules/@types/react-dom/node_modules/@types/react/index.d.ts:3464:13 
    TS2403: Subsequent variable declarations must have the same type.  Variable 'a' must be of type 'HTMLProps<HTMLAnchorElement>', but here has type 'DetailedHTMLProps<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>'.
[at-loader] ./node_modules/@types/react-dom/node_modules/@types/react/index.d.ts:3465:13 
    TS2403: Subsequent variable declarations must have the same type.  Variable 'abbr' must be of type 'HTMLProps<HTMLElement>', but here has type 'DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>'.
[at-loader] ./node_modules/@types/react-dom/node_modules/@types/react/index.d.ts:3466:13 
    TS2403: Subsequent variable declarations must have the same type.  Variable 'address' must be of type 'HTMLProps<HTMLElement>', but here has type 'DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>'.
[at-loader] ./node_modules/@types/react-dom/node_modules/@types/react/index.d.ts:3467:13 
    TS2403: Subsequent variable declarations must have the same type.  Variable 'area' must be of type 'HTMLProps<HTMLAreaElement>', but here has type 'DetailedHTMLProps<AreaHTMLAttributes<HTMLAreaElement>, HTMLAreaElement>'.
    ...

Interestingly, if I use npm it works fine?

Here's my yarn.lock if it helps:
yarn.zip

*Originally created by @lyphtec on 9/15/2017* Hi, I get HMR errors running sample React app with latest version: ## Versions ``` > yarn --version 1.0.2 > dotnet --version 2.0.2-vspre-006949 > node --version v8.5.0 > npm --version 5.3.0 ``` ## Steps to reproduce - `dotnet new react` - `yarn install` - `dotnet run` (in dev mode) ## Errors from Chrome console ``` [HMR] connected client.js:160 [HMR] bundle has 678 errors client.js:161 [at-loader] ./node_modules/@types/react-dom/node_modules/@types/react/index.d.ts:3464:13 TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'HTMLProps<HTMLAnchorElement>', but here has type 'DetailedHTMLProps<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>'. [at-loader] ./node_modules/@types/react-dom/node_modules/@types/react/index.d.ts:3465:13 TS2403: Subsequent variable declarations must have the same type. Variable 'abbr' must be of type 'HTMLProps<HTMLElement>', but here has type 'DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>'. [at-loader] ./node_modules/@types/react-dom/node_modules/@types/react/index.d.ts:3466:13 TS2403: Subsequent variable declarations must have the same type. Variable 'address' must be of type 'HTMLProps<HTMLElement>', but here has type 'DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>'. [at-loader] ./node_modules/@types/react-dom/node_modules/@types/react/index.d.ts:3467:13 TS2403: Subsequent variable declarations must have the same type. Variable 'area' must be of type 'HTMLProps<HTMLAreaElement>', but here has type 'DetailedHTMLProps<AreaHTMLAttributes<HTMLAreaElement>, HTMLAreaElement>'. ... ``` Interestingly, if I use `npm` it works fine? Here's my `yarn.lock` if it helps: [yarn.zip](https://github.com/aspnet/JavaScriptServices/files/1306472/yarn.zip)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#422
No description provided.