Skip to content

[Next.js] Module not found: Can't resolve './' #111

@satelllte

Description

@satelllte

Hi 👋🏻
The lib fails in Next.js with the following error on any import from @react-three/jolt:

./node_modules/jolt-physics/dist/jolt-physics.wasm-compat.js:12:121
Module not found: Can't resolve './'

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module:
./node_modules/@react-three/jolt/dist/index.mjs
./src/components/Scene/PhysicsDemo/PhysicsDemo.tsx

Example:

import {useEffect} from 'react';
import {Physics} from '@react-three/jolt';

export function PhysicsDemo() {
  return (
    <Physics>
      <InnerComponents/>
    </Physics>
  );
}

Have you ever experienced such issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions