Skip to content

Conflicting @types/node version #3793

Closed
@andrejleitner

Description

@andrejleitner

Describe the bug
There is fixed version of node types defined as socket.io dependency causing conflicts.

"@types/node": "^14.14.10",

To Reproduce

  • install other version of @types/node as your dev dependency of your project (e.g. @types/node@12)
  • install socket.io@3 as original dependency of your project
  • try to compile typescript file, you will get the following error:
node_modules/socket.io/dist/client.d.ts:1:23 - error TS4090: Conflicting definitions for 'node' found at
'~/example_project/node_modules/socket.io/node_modules/@types/node/index.d.ts' and
'~/example_project/node_modules/@types/node/index.d.ts'.
Consider installing a specific version of this library to resolve the conflict.

1 /// <reference types="node" />

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions