When I try to add Three JS to my Angular 7 project. I’ve installed npm install three --save
and npm install @type/webgl2
into my project, then when I start to import it shows a bunch error in my terminal
ERROR in node_modules/three/src/core/BufferAttribute.d.ts(21,6): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/three/src/core/InterleavedBufferAttribute.d.ts(19,6): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/three/src/core/InterleavedBufferAttribute.d.ts(20,6): error TS1086: An accessor cannot be declared in an ambient context.
Can you guys know why I’m getting this error or I need other dependencies for getting it to work?
This is what I have imported to my controller
import * as THREE from ‘three’;