我正在尝试将‘threejs meshline’包作为一个模块导入到我的index.js文件中。我通过npm安装的,它在一个'node_modules‘文件夹中。
我尝试这样导入它:
import {MeshLine, MeshLineMaterial, MeshLineRaycast} from 'threejs-meshline'
控制台给出此错误:“模块说明符不以"/”、"./“或”../“开头。”
将'../node_modules/‘添加到开头不起作用。
发布于 2020-08-13 19:31:09
确保您的项目具有package.json文件,并且已使用npm install threejs-meshline
从npm安装了threejs-meshline
https://stackoverflow.com/questions/63399672
复制相似问题