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.

@providesModule and require images support

See original GitHub issue

Current Behavior

I’ve tried to move from default packager to this library, but haul gives me an errors.

ERROR in ./src/navigator/Navigator.js
Module not found: Error: Can't resolve 'AppColors' in '/Users/simply/Projects/justhive/jh-mobile/src/navigator'
 @ ./src/navigator/Navigator.js 137:154-174
 @ ./src/navigator/index.js
 @ ./index.ios.js
 @ multi ./~/haul-cli/src/utils/polyfillEnvironment.js ./index.ios.js

or this one

ERROR in ./src/navigator/Navigator.js
Module not found: Error: Can't resolve 'img/icons/icon_nav_feed.png' in '/Users/simply/Projects/justhive/jh-mobile/src/navigator'
 @ ./src/navigator/Navigator.js 137:779-817
 @ ./src/navigator/index.js
 @ ./index.ios.js
 @ multi ./~/haul-cli/src/utils/polyfillEnvironment.js ./index.ios.js

Expected Behavior

Import or require files as it’s doing react packager

Haul Configuration (webpack.haul.js)

module.exports = ({ platform }) => ({
  entry: `./index.${platform}.js`,
});

Your Environment

software version
Haul 0.5.0
react-native 0.41
node 7.5.1
npm or yarn yarn 0.15.1

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
satya164commented, Apr 20, 2017

Haul doesn’t transpile modules under node_modules for performance and to avoid breaking third party libs. You can override the exclude property to transpile that module in the config you get as the argument

https://github.com/callstack-io/haul/blob/master/src/utils/makeReactNativeConfig.js#L81 https://github.com/callstack-io/haul#limitations

We’ll have better docs on this soon

0reactions
shahen94commented, Apr 20, 2017
const shaders = GL.Shaders.create({
  XproII: {
    frag: `
      precision highp float;
      varying vec2 uv;

      uniform sampler2D inputImageTexture;
      uniform sampler2D inputImageTexture2;
      uniform sampler2D inputImageTexture3; 

      void main () {

        vec3 texel = texture2D(inputImageTexture, uv).rgb;

        vec2 tc = (2.0 * uv) - 1.0;
        float d = dot(tc, tc);

        texel.r = texture2D(inputImageTexture3, vec2(d, (1.0-texel.r))).r;
        texel.g = texture2D(inputImageTexture3, vec2(d, (1.0-texel.g))).g;
        texel.b  = texture2D(inputImageTexture3, vec2(d, (1.0-texel.b))).b;

        texel.r = texture2D(inputImageTexture2, vec2(texel.r, .83333)).r;
        texel.g = texture2D(inputImageTexture2, vec2(texel.g, .5)).g;
        texel.b = texture2D(inputImageTexture2, vec2(texel.b, .16666)).b;

        gl_FragColor = vec4(texel, 1.0);
      }`
  }
});

Read more comments on GitHub >

github_iconTop Results From Across the Web

Support require which returns any if flow lost it #51 - GitHub
I want to ignore Required module not found and load it as any. Type checking to extenal libraries are not serious problem.
Read more >
React Native - Image Require Module using Dynamic Names
Obviously, this is a contrived example, but dynamic image names are important. Does React Native not support dynamic image names? React native ...
Read more >
Module Image problems - WordPress.org
What provides “module image menu”? This may be a plugin or theme conflict. Please attempt to disable all plugins, and use one of...
Read more >
Configuring a new React Native App | by Kelley Rose | Medium
After I add resources (fonts) and assets (images), I start on config ... Now, throughout the app, all I need to do in...
Read more >
dnf/yum shows "Modular dependency problems
dnf/yum shows "Modular dependency problems - nothing provides module(perl:5.26) needed by module freeradius:3.0" on new deployment · Issue.
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