I installed the three library via npm. In the node_modules directory there is the three folder. But when I wanted to import it using:
import * as THREE from 'three';
it gives the following error:
ReferenceError: regeneratorRuntime is not defined
But when I use;
import * as THREE from 'three/build/three.cjs';
it properly works. Also, the same problem occurs while importing external plugins:
import { OrbitControls } from "three/examples/jsm/controls/OrbitControls.js";
How can I fix this?