Skip to content

it did not contain a package, nor an index file #15030

@chenghaohao

Description

@chenghaohao

Is this a bug report?

(write your answer here)

Have you read the Bugs section of the Contributing to React Native Guide?

(Write your answer here.)

Environment

  1. react-native -v: 0.46.1
  2. node -v:v6.10.3
  3. npm -v:3.10.10
  4. yarn --version (if you use Yarn):v0.24.5

Then, specify:

  • Target Platform: Android
  • Development Operating System: Windows10
  • Build tools:

Steps to Reproduce

(Write your steps here:)

1.react-native start
2.err shows up: bundling failed: "Unable to resolve module ./img/tabbar/pfb_tabbar_homepage@2x.png from F:\\code\\react-native\\meituanCopy\\src\\RootScene.js: could not resolve `F:\code\react-native\meituanCopy\src\img\tabbar\pfb_tabbar_homepage@2x.png' as a folder: it did not contain a package, nor an index file"
3.just using <Image
source={require('../img/tabbar/pfb_tabbar_homepage@2x.png')} /> and the png is existed

Expected Behavior

Actual Behavior

in v0.44.0 react-native , the code runs well..but when i copy the code to a new demo. the err shows...

Reproducible Demo

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions