Can't resolve Three.es.min.js in React-PDB-View component

63 views Asked by At

So I'm trying to display a custom output pdb file in react but keep facing the same error, which I'm pasting below. All help will be greatly appreciated.

Module not found: Error: Can't resolve '../../node_modules/three-full/builds/Three.es.min.js' in '\my-project\node_modules\react-pdb-view\lib'

import React, { useEffect, useRef } from 'react';
import PDBView from 'react-pdb-view';
function PDBViewer({ filePath })  {
  return (
    <PDBView

    url={filePath} 

    atomIncrement={0}  

    width="60vw"  

    height="60vh"  

    atomSize={200}  

    cameraDistance={100}  

    autoRotate={false}  

  />
  )
}

export default PDBViewer

I have already tried updating the versions of react-pdb-view and three-full. All the required files are there in node modules, even the one the error says it can't resolve. I have also tried deleting node modules and reinstalling, etc. All the basic solutions one would try, those have been done but I still can't make it work.

0

There are 0 answers