React-native-router-flux: Cannot resolve 'file' or 'directory' ./assets/back-icon.png

Created on 2 Aug 2016  路  7Comments  路  Source: aksonov/react-native-router-flux

Version

  • "react": "~15.1.0",
  • "react-native": "^0.28.0",,
  • "react-native-router-flux": "^3.32.0",

    Expected behaviour

On running web pack build, I expect the build to succeed without any errors, but

Actual behaviour

On running packager with web pack, I get the following error :

ERROR in ./~/react-native-experimental-navigation/NavigationHeaderBackButton.js
Module not found: Error: Cannot resolve 'file' or 'directory' ./assets/back-icon.png in /Users/shivekkhurana/Documents/WIP/Cfel/LifeU/node_modules/react-native-experimental-navigation
 @ ./~/react-native-experimental-navigation/NavigationHeaderBackButton.js 37:54-87

Steps to reproduce

Here is the web pack config

...
  loaders: [
        {
          test: /\.js$/,
          include: /node_modules\/react-native/,
          loader: 'babel',
          query: {
            cacheDirectory: true,
            presets: ['es2015', 'stage-1', 'react']
          }
        },
        {
          test: /\.(js|jsx|es6)$/,
          exclude: /node_modules/,
          loader: 'babel',
          query: {
            cacheDirectory: true,
            presets: ['react-native', 'es2015', 'stage-1', 'react']
          }
        },
        {
          test: /\.(png|jpg|gif|otf|eot|svg|ttf|woff)$/,
          loader: 'url-loader?limit=8192'
        }
      ]
...

I feel that I'm missing something, as I see the back button file is actually present for various resolutions. How to go about this ?

Thank you.

All 7 comments

Also experiencing this bug. Figure out a solution @shivekkhurana?

Not yet.

+1
have samoe error when building production app with Android Studio

+1

The sample code in react native shows this error as well.

For those who are still here, I strongly recommend shifting to facebook's official navigation : https://reactnavigation.org/

+1

Any updates on this issue? I have been getting a similar error. Also, is this bug related to react-native-router-flux?

Any updates on this? We are getting it also and have tried nearly everything.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vinayr picture vinayr  路  3Comments

YouYII picture YouYII  路  3Comments

VictorK1902 picture VictorK1902  路  3Comments

GCour picture GCour  路  3Comments

kirankalyan5 picture kirankalyan5  路  3Comments