在main.js中引用npm install three 安装的three.js
import * as THREE from 'three';
const scene = new THREE.Scene();
console.log('111111',scene);
然后通过 node main.js 启动提示错误
这个是什么原因导致的应该怎么改?
在main.js中引用npm install three 安装的three.js
import * as THREE from 'three';
const scene = new THREE.Scene();
console.log('111111',scene);
然后通过 node main.js 启动提示错误
这个是什么原因导致的应该怎么改?
3 回答2.5k 阅读✓ 已解决
5 回答2.5k 阅读
2 回答903 阅读✓ 已解决
1 回答851 阅读✓ 已解决
2 回答1.1k 阅读
2 回答1.6k 阅读
1 回答870 阅读✓ 已解决
本身 nodejs 连 esModule 都不支持 跟何况你用
*
;nodejs 本身是有自己的模块系统方式的
如果想要在nodejs中使用
esModule
建议参考 这个文档 nodejs es module