question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't make Haul to work together with Realm

See original GitHub issue

Current Behavior

Compiling fails.

Expected Behavior

To compile.

Haul Configuration (webpack.haul.js)

Default.

Your Environment

software version
Haul 1.0.0-beta.13
react-native 0.50.3
node 8.4.0
yarn 1.5.1
realm 2.2.13

Stacktrace:

./node_modules/realm/lib/index.js
102:27-55 Critical dependency: the request of a dependency is an expression
   at CommonJsRequireContextDependency.getWarnings (/Users/ferrannp/Development/Projects/ReactNative/Showman/node_modules/webpack/lib/dependencies/ContextDependency.js:39:18)
   at Compilation.reportDependencyErrorsAndWarnings (/Users/ferrannp/Development/Projects/ReactNative/Showman/node_modules/webpack/lib/Compilation.js:703:24)
   at Compilation.finish (/Users/ferrannp/Development/Projects/ReactNative/Showman/node_modules/webpack/lib/Compilation.js:561:9)
   at applyPluginsParallel.err (/Users/ferrannp/Development/Projects/ReactNative/Showman/node_modules/webpack/lib/Compiler.js:506:17)
   at /Users/ferrannp/Development/Projects/ReactNative/Showman/node_modules/tapable/lib/Tapable.js:289:11
   at _addModuleChain (/Users/ferrannp/Development/Projects/ReactNative/Showman/node_modules/webpack/lib/Compilation.js:507:11)
   at processModuleDependencies.err (/Users/ferrannp/Development/Projects/ReactNative/Showman/node_modules/webpack/lib/Compilation.js:477:14)
   at _combinedTickCallback (internal/process/next_tick.js:131:7)
   at process._tickCallback (internal/process/next_tick.js:180:9)
@ ./node_modules/realm/lib/index.js
@ ./src/database/index.js
@ ./src/root.js
@ ./src/index.js
@ ./index.ios.js
@ multi ./node_modules/haul/src/utils/polyfillEnvironment.js ./index.ios.js

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:2
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

4reactions
danielkczcommented, Mar 29, 2018

As far as I know, the Webpack does not support dynamic require except using require.context (non-standard) and with Webpack 4 there should be support for dynamic import. I think you need to open issue in Realm repo to support Webpack, there is nothing Haul can do about this. But hey, I am no expert here 😃

Edit: Or perhaps webpack.ContextReplacementPlugin plugin could do some good, but haven’t used that yet.

0reactions
rdycommented, Apr 3, 2018

@Exulansis you can configure the babel-loader to parse realm, by default I think it skips node modules, just do so in your webpack.haul.js. Provided you have the right transforms in your babelrc it should work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Realm crashes on create when using Haul #2627 - GitHub
I am trying to get Realm working with Haul. It was working fine when I was using the react native packager but I'm...
Read more >
Workaround if you can't see Realms invites (Java edition 1.18.2)
First try pressing F11 twice on the Realms screen. If that doesn't work: Turn Fullscreen off in Video Settings to switch to Windowed...
Read more >
Minecraft Realms Plus Troubleshooting – Home
This article provides general troubleshooting for connection issues for Minecraft Realms Plus. For information on Minecraft: Java Edition Realms multiplayer ...
Read more >
Realm - Can't create object with existing primary key value
When you call realm.create(Dog.self, value:dog, update: true) , if an object with ... keys since you can use the Realm.object(ofType:forPrimaryKey:) method:
Read more >
Playing on a Realm in both Java and Win10 - Arqade
If you are playing not on a Realm, but on a Java Edition Spigot server, there have been packet translators already made, like...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found