Interact.js: Plenty of TypeScript errors during compilation

Created on 16 Jan 2020  路  2Comments  路  Source: taye/interact.js

I installed the newest version of interact and after running npm run watch, I get dozens of errors. Examples:

`
ERROR in ../node_modules/@interactjs/interactjs/index.ts
Module build failed (from ../node_modules/ts-loader/index.js):
Error: TypeScript emitted no output for e:\Sync\www2\node_modules\@interactjs\interactjs\index.ts.
at makeSourceMapAndFinish (e:\Sync\www2\node_modules\ts-loader\dist\index.js:78:15)
at successLoader (e:\Sync\www2\node_modules\ts-loader\dist\index.js:68:9)
at Object.loader (e:\Sync\www2\node_modules\ts-loader\dist\index.js:22:12)
@ ../node_modules/interactjs/index.ts 15:14-53 17:9-48
@ ../node_modules/babel-loader/lib??ref--1-0!../node_modules/vue-loader/lib??vue-loader-options!./resources/js/Departments/Admin app/components/PersonalizatorLayerSetting.vue?vue&type=script&lang=js&
@ ./resources/js/Departments/Admin app/components/PersonalizatorLayerSetting.vue?vue&type=script&lang=js&
@ ./resources/js/Departments/Admin app/components/PersonalizatorLayerSetting.vue
@ ../node_modules/babel-loader/lib??ref--1-0!../node_modules/vue-loader/lib??vue-loader-options!./resources/js/Departments/Admin app/components/Admin Personalizator.vue?vue&type=script&lang=js&
@ ./resources/js/Departments/Admin app/components/Admin Personalizator.vue?vue&type=script&lang=js&
@ ./resources/js/Departments/Admin app/components/Admin Personalizator.vue
@ ./resources/js/Departments/Admin app/Admin app.js
@ ./resources/js/Departments/Vue modules/Vue admin loader.ts
@ ./resources/js/AdminApp.ts

ERROR in e:\Sync\www2node_modules\interactjs\index.ts
../node_modules/interactjs/index.ts
[tsl] ERROR in e:\Sync\www2node_modules\interactjs\index.ts(4,12)
TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.

ERROR in e:\Sync\www2node_modules\interactjs\index.ts
../node_modules/interactjs/index.ts
[tsl] ERROR in e:\Sync\www2node_modules\interactjs\index.ts(4,37)
TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.

ERROR in e:\Sync\www2node_modules\interactjs\index.ts
../node_modules/interactjs/index.ts
[tsl] ERROR in e:\Sync\www2node_modules\interactjs\index.ts(5,9)
TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.

ERROR in e:\Sync\www2node_modules\@interactjs\interact\index.ts
[tsl] ERROR in e:\Sync\www2node_modules\@interactjs\interact\index.ts(48,7)
TS2591: Cannot find name 'process'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.

ERROR in e:\Sync\www2node_modules\@interactjs\interact\index.ts
[tsl] ERROR in e:\Sync\www2node_modules\@interactjs\interact\index.ts(56,20)
TS2591: Cannot find name 'process'. Do you need to install type definitions for node? Try npm i @types/node and then add node to the types field in your tsconfig.

ERROR in e:\Sync\www2node_modules\@interactjs\core\scope.ts
[tsl] ERROR in e:\Sync\www2node_modules\@interactjs\core\scope.ts(142,30)
TS2322: Type 'string | undefined' is not assignable to type 'string'.
Type 'undefined' is not assignable to type 'string'.

ERROR in e:\Sync\www2node_modules\@interactjs\core\scope.ts
[tsl] ERROR in e:\Sync\www2node_modules\@interactjs\core\scope.ts(160,30)
TS2538: Type 'undefined' cannot be used as an index type.

ERROR in e:\Sync\www2node_modules\@interactjs\core\scope.ts
[tsl] ERROR in e:\Sync\www2node_modules\@interactjs\core\scope.ts(189,44)
TS2322: Type 'string | undefined' is not assignable to type 'string'.
Type 'undefined' is not assignable to type 'string'.
`

I tried turning strict to false, but didn't happen.

NPM: 6.13.6
Webpack: 4.41.5
InteractJs: 1.8.0-rc.2
Typescript: 3.7.4

Thank you for the help!

Most helpful comment

Thanks for reporting this. I've fixed it in v1.8.0-rc.3.

All 2 comments

Thanks for reporting this. I've fixed it in v1.8.0-rc.3.

Taye, it works, great! This was super fast solution, much appreciated!

Was this page helpful?
0 / 5 - 0 ratings