Skip to content

ReactNativeJS: Requiring unknown module "./locale/en-US" on release build #16540

@6be709c0

Description

@6be709c0

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

Yes

Environment

Environment:
OS: Linux 4.10
Node: 6.10.3
Yarn: 0.24.4
npm: 3.10.10
Watchman: Not Found
Xcode: Not Found
Android Studio: Not Found (I'm using docker)

Packages: (wanted => installed)
react-native: 0.48.4 => 0.48.4

My error

I am using I18n to translate the app, but I have the following error only when I build the assets :
(I don't know if the error is due to I18n)

0-26 09:56:58.545 19105 19161 E ReactNativeJS: Requiring unknown module "./locale/en-US".
10-26 09:56:58.552 19105 19161 E ReactNativeJS: Requiring unknown module "./locale/en-us".
10-26 09:56:58.561 19105 19162 E AndroidRuntime: FATAL EXCEPTION: mqt_native_modules
10-26 09:56:58.561 19105 19162 E AndroidRuntime: Process: com.nelio, PID: 19105
10-26 09:56:58.561 19105 19162 E AndroidRuntime: com.facebook.react.common.JavascriptException: Requiring unknown module "./locale/en-US"., stack:
10-26 09:56:58.561 19105 19162 E AndroidRuntime: o@2:783
10-26 09:56:58.561 19105 19162 E AndroidRuntime: n@2:426
...

My steps :

m -rf node_modules
yarn install
react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
react-native run-android --variant=release

And the app crash when I launched it. Not in debug mode.
Do you have any idea how to add this module ? Manually or automatically ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions