question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

V5 creation , error on npm start

See original GitHub issue

Steps to reproduce

I created a new V5 app and it installed normally.

when I ran it with npm run dev it ran normally but crashed when ran with npm run start with the following error

> shx rm -rf lib/ && tsc

node_modules/socket.io/dist/namespace.d.ts:14:133 - error TS2344: Type 'ListenEvents' does not satisfy the constraint 'EventsMap'.

14 export interface ServerReservedEventsMap<ListenEvents, EmitEvents, ServerSideEvents, SocketData> extends NamespaceReservedEventsMap<ListenEvents, EmitEvents, ServerSideEvents, SocketData> {
                                                                                                                                       ~~~~~~~~~~~~

  node_modules/socket.io/dist/namespace.d.ts:14:42
    14 export interface ServerReservedEventsMap<ListenEvents, EmitEvents, ServerSideEvents, SocketData> extends NamespaceReservedEventsMap<ListenEvents, EmitEvents, ServerSideEvents, SocketData> {
                                                ~~~~~~~~~~~~
    This type parameter might need an `extends EventsMap` constraint.

node_modules/socket.io/dist/namespace.d.ts:15:42 - error TS2344: Type 'ListenEvents' does not satisfy the constraint 'EventsMap'.

15     new_namespace: (namespace: Namespace<ListenEvents, EmitEvents, ServerSideEvents, SocketData>) => void;
                                            ~~~~~~~~~~~~

  node_modules/socket.io/dist/namespace.d.ts:14:42
    14 export interface ServerReservedEventsMap<ListenEvents, EmitEvents, ServerSideEvents, SocketData> extends NamespaceReservedEventsMap<ListenEvents, EmitEvents, ServerSideEvents, SocketData> {
                                                ~~~~~~~~~~~~
    This type parameter might need an `extends EventsMap` constraint.


Found 2 errors in the same file, starting at: node_modules/socket.io/dist/namespace.d.ts:14

System configuration

Module versions (especially the part that’s not working): “^5.0.0-pre.28”

NodeJS version: v18.4.0

Operating System: Manjaro

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
dafflcommented, Aug 30, 2022

Looks like this is an error in TypeScript 4.8.2 - it works properly with version 4.7.4. It also works setting the skipLibCheck option to true which might open another can of worms but could also be helpful because library definitions (and apparently even TypeScript itself) tend to break a lot.

0reactions
dafflcommented, Sep 14, 2022

It appears this is fixed in TypeScript 4.8.3

Read more comments on GitHub >

github_iconTop Results From Across the Web

'npm start' returns error: "There might be a problem with the ...
There might be a problem with the project dependency tree. It is likely not a bug in Create React App, but something you...
Read more >
npm start fail for node 8.0.0 and npm 5.0.1 fresh install #233
I installed create-react-native-app using yarn and yarn start shows that error about using npm version 5.0.3, although create-react-native-app is not ...
Read more >
node-sass - npm
Start using node-sass in your project by running `npm i node-sass`. There are 12478 other projects in the npm registry using node-sass.
Read more >
How to Fix the Error Error:error:0308010C:digital envelope ...
Run node -v && npm -v to verify the versions of Node.js and npm running ... In v5.0.0 of Create React App, the...
Read more >
Getting Started - Create React App
If you've previously installed create-react-app globally via npm install -g create-react-app , we recommend you uninstall the package using ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found