Skip to content

JS file with 1000+ image map gives fs operation timeout #8794

Description

@nak1b

I have javascript file that looks like below. It has lots of object (1000+). As we cannot use dynamic name for images in react-native this is my work around.

"grinning": {
        "image": require('./images/1f600.png'),
        "shortname": ":grinning:",
    }

I am requiring this file in some other react native function and looping to display all the images. But getting internal error on requiring too many images in javascript file.

{"type":"InternalError","message":"react-packager has encountered an internal error, please check your terminal error output for details"}
In terminal it says

fs operation timeout

This works if i remove few entries from the file.

Any suggestion or better approach

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