[BUG] Uncaught TypeError: Cannot read properties of undefined (reading 'ClientMsgCode') when using this modules with Parcel
See original GitHub issueDescribe the bug
When using this modules with Parcel, I get the error Uncaught TypeError: Cannot read properties of undefined (reading 'ClientMsgCode')
.
To Reproduce
Steps to reproduce the behavior:
import { createClient } from "@liveblocks/client";
createClient
is called
Expected behavior
Liveblocks app should work with parcel app.
Environment (please complete the following information):
- @liveblocks/react@0.18.5 @liveblocks/client@0.18.5
- chrome v106.0.5249.119
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:5
Top Results From Across the Web
2.6.2: build error @parcel/compressor-raw: Cannot read ...
2, when trying to build we get an error of @parcel/compressor-raw: Cannot read properties of undefined (reading 'on') . It's an error that ......
Read more >Uncaught TypeError: Cannot read properties of undefined ...
The error happens when I import my LabelModule into the FormFieldModule. Then I use the Label Component in the FormField Component.
Read more >Bundling and Building with Parcel - Beginner JavaScript
Bundlers let us ship code to a browser and have it be as performant as possible. Using Parcel. Wes is going to show...
Read more >Cannot read properties of undefined' - JavaScript Debugging
How To Fix ' Uncaught TypeError : Cannot read properties of undefined ' - JavaScript Debugging.
Read more >Migration - Parcel
You can also do this by using your package manager, e.g. npm or yarn . ... Note: Adding the type="module" attribute also affects...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@nvie Thank you!!!❤️ I was able to get it to work in my parcel-based environment!😄 I really appreciate this fix, as this was a very important issue for me!
Thanks @nishidayoshikatsu for reporting. I can confirm that this indeed breaks on a standard Parcel build. There is a reason we generate the ESM build output the way we do, but apparently this format breaks when used with Parcel. We’re going to be looking into the root cause of this this week, and see if we can find a way that works in all bundlers.