I encountered an error while using the deno-loader plugin in my Deno project. The error message indicates that it could not resolve the "react" module only when using @react-three/drei. It's doing fine with @react-three/fiber.
Error Message
✘ [ERROR] Could not resolve "react" [plugin deno-loader]
../../../Library/Caches/deno/deno_esbuild/tunnel-rat@0.1.2_react@18.2.0/node_modules/tunnel-rat/dist/index.js:1:18:
1 │ import React from 'react';
╵ ~~~~~~~
...
error: Uncaught (in promise) Error: Build failed with 3 errors:
../../../Library/Caches/deno/deno_esbuild/@react-three/drei@9.105.2_@react-three+fiber@8.16.1__react@18.2.0__three@0.163.0_react@18.2.0_three@0.163.0/node_modules/@react-three/drei/web/Html.js:3:26: ERROR: [plugin: deno-loader] Could not resolve "react-dom/client"
../../../Library/Caches/deno/deno_esbuild/@react-three/drei@9.105.2_@react-three+fiber@8.16.1__react@18.2.0__three@0.163.0_react@18.2.0_three@0.163.0/node_modules/@react-three/drei/web/ScrollControls.js:3:26: ERROR: [plugin: deno-loader] Could not resolve "react-dom/client"
../../../Library/Caches/deno/deno_esbuild/tunnel-rat@0.1.2_react@18.2.0/node_modules/tunnel-rat/dist/index.js:1:18: ERROR: [plugin: deno-loader]
Steps to Reproduce
Install the deno-loader plugin in a Deno project.
Attempt to import the "@react-three/drei" module using esbuild and the deno-loader in a JavaScript or TypeScript file.
Run the Deno script.
Expected Behavior
The deno-loader plugin should be able to resolve the "react" module and allow its usage in the Deno project.
Actual Behavior
The deno-loader plugin fails to resolve the "react" module, resulting in the aforementioned error.
The error occurs when importing the "react" module from the "tunnel-rat" package.
The file path in the error message suggests that the "react" module is being imported from a cached location.
Possible Cause
It seems that the deno-loader plugin is unable to resolve the "react" module correctly, possibly due to a configuration issue or a compatibility problem between the plugin and the "react" module.
I would appreciate any assistance or guidance in resolving this issue. Please let me know if you need any further information or clarification.
Description
I encountered an error while using the deno-loader plugin in my Deno project. The error message indicates that it could not resolve the "react" module only when using @react-three/drei. It's doing fine with @react-three/fiber.
Error Message
Steps to Reproduce
Expected Behavior
The deno-loader plugin should be able to resolve the "react" module and allow its usage in the Deno project.
Actual Behavior
The deno-loader plugin fails to resolve the "react" module, resulting in the aforementioned error.
Environment
Additional Information
Possible Cause
It seems that the deno-loader plugin is unable to resolve the "react" module correctly, possibly due to a configuration issue or a compatibility problem between the plugin and the "react" module.
I would appreciate any assistance or guidance in resolving this issue. Please let me know if you need any further information or clarification.
Thank you for your attention to this matter.