Reputation: 1275
I get the same error no matter what I import from the drei package, I am sure I have installed all the necessary packages and the latest versions, but I have this odd error.
Compiled with problems:X
ERROR in ./node_modules/@react-three/drei/core/Trail.js 104:38-54
export 'MeshLineGeometry' (imported as 'MeshLineGeometry') was not found in 'meshline' (module has no exports)
ERROR in ./node_modules/@react-three/drei/core/Trail.js 107:18-34
export 'MeshLineMaterial' (imported as 'MeshLineMaterial') was not found in 'meshline' (module has no exports)
ERROR in ./node_modules/meshline/dist/index.js 1:0-35
Module not found: Error: Can't resolve './MeshLineGeometry' in 'C:\Users\anura\Desktop\mysite\node_modules\meshline\dist'
Did you mean 'MeshLineGeometry.js'?
BREAKING CHANGE: The request './MeshLineGeometry' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
Upvotes: 2
Views: 776
Reputation: 11
Downgrading not working solved it temporarily as follows.
index.js
from node_modules/meshline/dist to lib/meshline
in the root folder.js
extensions to each lineFixed index.js in lib/meshline
Upvotes: 1