Skip to content

bug: ENOENT: no such file or directory, copyfile 'node_modules/react-native-test-app/example/.gitignore' -> 'example/.gitignore' #1228

@andrew-hm

Description

@andrew-hm

What happened?

running init-test-app crashes due to behavior in npm. i'm no expert on the matter so take this solution with grain of salt. adding a .npmignore file will preserve the .gitignore file in the example folder. steps to reproduce are simple enough. i'm using node 18.9.1 with npm v8.19.1. run npm install react-native-test-app and you will see that under node_modules/react-native-test-app/example there is a .npmignore file but not the .gitignore file as expected. if you download the tarball from npm you will see the .gitignore as expected. simplest solution is to just add an empty .npmignore file to the example folder to prevent this behavior 🤷‍♂️

Version

2.0.3

What platforms are you seeing this issue on?

  • Android
  • iOS
  • macOS
  • Windows

System Information

not relevant

Steps to Reproduce

listed in description above ↑

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions