Skip to content

[Bug]: Unable to resolve NitroTextConfig.json in expo build #144

@e-simpson

Description

@e-simpson

What happened?

Tried to build iOS app locally and with EAS cloud build and both got:

Error: Unable to resolve module ../nitrogen/generated/shared/json/NitroTextConfig.json from /Users/expo/workingdir/build/node_modules/react-native-nitro-text/lib/commonjs/nitro-text.js: 
None of these files exist:
  * node_modules/react-native-nitro-text/lib/nitrogen/generated/shared/json/NitroTextConfig.json(.web.ts|.ts|.web.tsx|.tsx|.web.js|.js|.web.jsx|.jsx|.web.json|.json|.web.cjs|.cjs|.web.mjs|.mjs|.web.scss|.scss|.web.sass|.sass|.web.css|.css)
  * node_modules/react-native-nitro-text/lib/nitrogen/generated/shared/json/NitroTextConfig.json
   8 | var _reactNative = require("react-native");
   9 | var _reactNativeNitroModules = require("react-native-nitro-modules");
> 10 | var _NitroTextConfig = _interopRequireDefault(require("../nitrogen/generated/shared/json/NitroTextConfig.json"));
     |                                                        ^
  11 | var _utils = require("./utils");
  12 | var _jsxRuntime = require("react/jsx-runtime");
  13 | function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
Import stack:
 node_modules/react-native-nitro-text/lib/commonjs/nitro-text.js
 | import "../nitrogen/generated/shared/json/NitroTextConfig.json"
 node_modules/react-native-nitro-text/lib/commonjs/index.js
 | import "./nitro-text"

The build/code/package worked fine in local dev builds.

Steps to reproduce

  1. Install react-native-nitro-text 1.1.0
  2. Expo local build ios via eas build --platform ios --local

Code sample

Environment

Expo 55.0.0-preview.10, iOS, build pipeline

Checklist

  • I have searched existing issues
  • I have provided a minimal reproduction case

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions