Title: SyntaxError when importing named exports in React: "Importing binding name 'default' cannot be resolved by star export entries"

I’m encountering a SyntaxError in my React application when trying to import named exports from a module. The error message I’m receiving is:

SyntaxError: Importing binding name 'default' cannot be resolved by star export entries.

I’ve tried to resolve this issue by ensuring that I’m importing and exporting the modules correctly, but I’m still unable to fix the problem. Here’s a simplified version of my code:

// Importing named exports
import { useRef, useState, useEffect } from 'react';
import * as THREE from 'three';
import Camera from './Camera.js';
import Renderer from './Renderer.js';
// Other imports...

// Functional component
const Home = () => {
  // Component logic...

// Class component
class AppInstance {
  // Component logic...

// Exporting named exports
export { AppInstance, Home };

I’ve checked my imports and exports, and they seem to be correct. However, I’m still encountering this SyntaxError. Can someone please help me identify what might be causing this issue and how I can resolve it? Any insights or suggestions would be greatly appreciated. Thank you!

Thank you i resolved the issue

1 Like