ERROR in C:/phpStudy2018/PHPTutorial/WWW/Tms.Web/node_modules/@types/node/globals.d.ts(139,11):
139:11 Interface 'NodeRequire' cannot simultaneously extend types 'Require' and 'RequireFunction'.
Named property 'cache' of types 'Require' and 'RequireFunction' are not identical.
137 |
138 | // For backwards compability
> 139 | interface NodeRequire extends NodeJS.Require {}
| ^
140 | interface RequireResolve extends NodeJS.RequireResolve {}
141 | interface NodeModule extends NodeJS.Module {}
142 |
error in C:/phpStudy2018/PHPTutorial/WWW/Tms.Web/node_modules/@types/node/globals.d.ts
ERROR in C:/phpStudy2018/PHPTutorial/WWW/Tms.Web/node_modules/@types/node/globals.d.ts(139,11):
My environment is vue.js + typescript. I don't know if I have any problems with my configuration or with the third-party package Can you give me some useful advice Thank you
I had same problem.
the version of @types/node was 13.1.0 released at Mon, 23 Dec 2019 16:40:55 GMT
in my case, it's working when I use former version 12.12.22
npm install --save-dev @types/[email protected]
I think it's better to exclude the @types
definitions from the compilation:
https://stackoverflow.com/a/57113847/1704895
It's amazing simple ( tsconfig.json ):
{
"compilerOptions": {
...,
"types": []
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With