nartc / angular-three

🧊 THREE.js integration for Angular 🧊
https://angular-three.netlify.app/
MIT License
306 stars 26 forks source link

Cannon JS problem #143

Closed alcaponepl closed 2 years ago

alcaponepl commented 2 years ago

Hi, I have this problem

`Error: node_modules/@pmndrs/cannon-worker-api/dist/cannon-worker-api.d.ts:2:8 - error TS1259: Module '"events"' can only be default-imported using the 'allowSyntheticDefaultImports' flag

2 import EventEmitter from 'events';


  node_modules/@types/node/events.d.ts:46:5
    46     export = EventEmitter;
This module is declared with using 'export =', and can only be used with a default import when using the 'allowSyntheticDefaultImports' flag.

Error: node_modules/@pmndrs/cannon-worker-api/dist/cannon-worker-api.d.ts:2:8 - error TS1259: Module '"events"' can only be default-imported using the 'allowSyntheticDefaultImports' flag

2 import EventEmitter from 'events';


  node_modules/@types/node/events.d.ts:46:5
    46     export = EventEmitter;
This module is declared with using 'export =', and can only be used with a default import when using the 'allowSyntheticDefaultImports' flag.

Error: node_modules/@pmndrs/cannon-worker-api/dist/props-to-body.d.ts:4:12 - error TS2304: Cannot find name 'BodyProps'.

4 props: BodyProps;


Error: node_modules/@pmndrs/cannon-worker-api/dist/props-to-body.d.ts:5:11 - error TS2304: Cannot find name 'BodyShapeType'.

5     type: BodyShapeType;

`

"dependencies": { "@angular-three/cannon": "^5.5.0", "@angular-three/controls": "^2.0.0-beta.8", "@angular-three/core": "^5.5.0", "@angular-three/postprocessing": "^5.5.0", "@angular-three/schematics": "^5.5.0", "@angular-three/soba": "^5.5.0", "@angular/animations": "^14.1.0", "@angular/common": "^14.1.0", "@angular/compiler": "^14.1.0", "@angular/core": "^14.1.0", "@angular/forms": "^14.1.0", "@angular/platform-browser": "^14.1.0", "@angular/platform-browser-dynamic": "^14.1.0", "@angular/router": "^14.1.0", "@nrwl/angular": "^14.5.2", "rxjs": "~7.5.0", "three": "^0.142.0", "tslib": "^2.3.0", "zone.js": "~0.11.4" }, "devDependencies": { "@angular-devkit/build-angular": "^14.1.0", "@angular/cli": "~14.1.0", "@angular/compiler-cli": "^14.1.0", "@types/jasmine": "~4.0.0", "@types/three": "~0.141.0", "jasmine-core": "~4.2.0", "karma": "~6.4.0", "karma-chrome-launcher": "~3.1.0", "karma-coverage": "~2.2.0", "karma-jasmine": "~5.1.0", "karma-jasmine-html-reporter": "~2.0.0", "postprocessing": "^6.28.4", "typescript": "~4.7.2" }

alcaponepl commented 2 years ago

I forgot to add "skipLibCheck": true in tsconfig