pmndrs / drei

🥉 useful helpers for react-three-fiber
https://drei.pmnd.rs/
MIT License
7.83k stars 642 forks source link

Tunnel-rat breaks production build #1983

Open Kinatzo opened 4 weeks ago

Kinatzo commented 4 weeks ago

I get the following error after in production environment after drei 9.94.0. The package "tunnel-rat" seems to cause the problem. In local development everything works fine.

(node:1) ExperimentalWarning: Import assertions are not a stable feature of the JavaScript language. Avoid relying on their current behavior and syntax as those might change in a future version of Node.js.
(Use `node --trace-warnings ...` to show where the warning was created)
(node:1) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
node:internal/modules/cjs/loader:1048
  const err = new Error(message);
              ^
Error: Cannot find module 'react'
Require stack:
- /application/node_modules/.pnpm/tunnel-rat@0.1.2_@types+react@18.3.3_react@18.3.1/node_modules/tunnel-rat/dist/index.cjs.js
- /application/node_modules/.pnpm/@react-three+drei@9.106.0_@react-three+fiber@8.16.6_@types+react@18.3.3_@types+three@0.164.1__wt2vgfjioethfevgvswzbmjkwe/node_modules/@react-three/drei/index.cjs.js