TS2305: Module “nostr-tools” has no exported member ‘Event’ Error in WebStorm but not in VSCode

I am currently working on a TypeScript project in WebStorm 2023.3.2 and I have encountered an issue. When I import the Event member from the nostr-tools module, WebStorm shows an error:

TS2305: Module “nostr-tools” has no exported member ‘Event’.

However, when I open the same project in VSCode, there is no such error. I try it on my two computers but all have same problem.

enter image description here

enter image description here

  • Is it possible WebStorm is using its own version of TypeScript with a different lib.d.ts? Have you added typescript as project development dependency?

    – 

  • i added typescript as project development dependency

    – 

  • I’m afraid that we can’t investigate this problem without a sample project from your side. Errors come from the Typescript compiler service and thus are specific to the project configuration (tsconfig.*.json files), installed packages and the project structure.

    – 

Leave a Comment