Replies: 10 comments
-
Note that for some reason, after I migrated my |
Beta Was this translation helpful? Give feedback.
-
There is no problem here who is better - What's the problem? You *can't using https://nodejs.org/api/esm.html#import-specifiers
https://docs.deno.com/runtime/fundamentals/modules/
Using your library can be broken for other developers. You have |
Beta Was this translation helpful? Give feedback.
-
@alexander-akait I've deleted the SO question, but here's the Reddit post detailing everything: https://www.reddit.com/r/learnjavascript/comments/1k4neum/invalid_hook_call_in_react_using_webpack/ |
Beta Was this translation helpful? Give feedback.
-
I recommend do not study how |
Beta Was this translation helpful? Give feedback.
-
@hydroperx Do you still have a problem with webpack? |
Beta Was this translation helpful? Give feedback.
-
@alexander-akait Right now, it'd be first this "new" exports issue that you've responded to, and then this misleading React hook error as I've given full information in the above Reddit post. |
Beta Was this translation helpful? Give feedback.
-
I've to give it a try to fix that exports issue, but I'd have to update my react library for that :/ |
Beta Was this translation helpful? Give feedback.
-
When I said exports I refer to the |
Beta Was this translation helpful? Give feedback.
-
I don't think you need to do it
It means you have two different copies of We respect the |
Beta Was this translation helpful? Give feedback.
-
@hydroperx I moved this to the discussion, but I will be glad to help in any case, at the moment the library in the ES modules format does not comply with the mandatory requirements for extensions, when you fix it and if you will have the same problem, ping me here, but mostly you have two versions of react, any context issue mostly related to the such problem. We don't make magic here and a lot of developers use webpack and react without such problem, so I assume that the problem is somewhere with dependencies, that is why you have two version of |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Bug report
What is the current behavior?
When serving my Webpack + TypeScript + React project I'm getting:
If the current behavior is a bug, please provide the steps to reproduce.
npm i && npm run dev
The error indicates that I am using React wrongly, but I confirmed I am using component top-level hooks only and the React and react-dom packages are not duplicating.
Full information here on why I'm doing it right.
@hydroperx/fluent
.My only workaround is to simply use Vite instead of Webpack.
What is the expected behavior?
Display a webpage with user interface elements such as a heading title "Metro demo", and several other components such as context menu, buttons, icons, live tiles and others, with no console or page error.
Other relevant information:
webpack version: 5.99.6
Node.js version: 22.14.0
Operating System: Windows 11
Additional tools: N/A
Beta Was this translation helpful? Give feedback.
All reactions