Conflicting @types/node version
See original GitHub issueDescribe the bug There is fixed version of node types defined as socket.io dependency causing conflicts. https://github.com/socketio/socket.io/blob/12221f296d52b3dcde34246bd1ada98871b4ada3/package.json#L48
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" />
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Resolve 'Conflicting definitions for node' TS4090 error in VS ...
My theory is, Visual Studio automatically included types for accessible version of node, as a part of linting functionality for JavaScript. But ...
Read more >Conflicting Type Dependencies - ember-cli-typescript
So now you have two versions of C installed in your node_modules directory: 1.2.3 (for B ) and 1.2.4 (for A , your...
Read more >Node Version Conflicts - Square 9 Documentation Hub
To check the installed version of Node.JS, open a command prompt by opening the start menu and typing "cmd". In the command prompt...
Read more >@types/node - npm
TypeScript definitions for Node.js. Latest version: 18.11.17, last published: 8 days ago. Start using @types/node in your project by running ...
Read more >Surviving the TypeScript Ecosystem — Part 4 - Medium
So if the types for node are not available when using the types for ... of my library conflict, or are slightly different,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I was about to open a different issue about moving
@types/node
to devDependencies. It’s a big package (around 740kb) and it should give no value on runtime.Hey @ironicbrew, thanks for looking at it. Before posting it here, I’ve tried a clean installation exactly as you suggested. It just didn’t help. Btw. doesn’t it make sense to have that and other @types defined as dependencies (non-dev)?