Issue with chalk dependency within jsondiffpatch [graphql-live-query-patch-jsondiffpatch]
See original GitHub issuehttps://github.com/benjamine/jsondiffpatch/issues/249
The issue is that the @n1ru4l/graphql-live-query-patch-jsondiffpatch
package doesn’t function in-browser due to importing everything from the jsondiffpatch package within this file, which makes the browser try to import the chalk
dependency, which throws an error in the browser because it’s trying to access process
which doesn’t exist outside of node.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Update chalk dependency · Issue #13728 · babel/babel - GitHub
What problem are you trying to solve? I've just been running Babel core in Deno using JSPM import maps ... Update chalk dependency...
Read more >chalk package issue in nodejs - Stack Overflow
The error above is because you're using the Common.JS module require syntax rather than the ES module import syntax. Update: const chalk ...
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
Ah it is unfortunate that this package is pretty messy 😰 Maybe we should inline it here instead - and further tweak it to not include the previous result - only the addition
It looks like the intended solution, from the
jsondiffpatch
readme is to import one of the distributions within the package for browser use:https://github.com/benjamine/jsondiffpatch#browser