Issue
When installing this package from GitHub (e.g., github:scantarbian/react-native-zebra-linkos), the postinstall script fails because the package is missing a tsconfig.json file in the project root.
Error
✖ Building target typescript
ℹ Cleaning up previous build at lib/typescript
ℹ Compiling 3 files in src with babel
ℹ Compiling 3 files in src with babel
ℹ Generating type definitions with tsc
✖ Couldn't find a tsconfig.json in the project root.
...
Error: Failed to build definition files.
Expected Behavior
The package should include a tsconfig.json (or tsconfig.build.json as referenced in react-native-builder-bob config) so that the typescript target can be built during postinstall.
Current package.json react-native-builder-bob config:
"react-native-builder-bob": {
"source": "src",
"output": "lib",
"targets": [
["commonjs", { "esm": true }],
["module", { "esm": true }],
["typescript", { "project": "tsconfig.build.json" }]
]
}
The typescript target references tsconfig.build.json which doesn't exist in the repository.
Suggested Fix
Add a tsconfig.build.json file to the project root that configures TypeScript to output declaration files from src/ to lib/typescript/src/.
Impact
Without this fix, packages installed from GitHub will have missing lib/ directory, causing:
- ESLint
import/no-unresolved errors
- Runtime import failures
- Missing TypeScript type definitions at
lib/typescript/src/index.d.ts
Issue
When installing this package from GitHub (e.g.,
github:scantarbian/react-native-zebra-linkos), thepostinstallscript fails because the package is missing atsconfig.jsonfile in the project root.Error
Expected Behavior
The package should include a
tsconfig.json(ortsconfig.build.jsonas referenced inreact-native-builder-bobconfig) so that the typescript target can be built during postinstall.Current package.json
react-native-builder-bobconfig:The
typescripttarget referencestsconfig.build.jsonwhich doesn't exist in the repository.Suggested Fix
Add a
tsconfig.build.jsonfile to the project root that configures TypeScript to output declaration files fromsrc/tolib/typescript/src/.Impact
Without this fix, packages installed from GitHub will have missing
lib/directory, causing:import/no-unresolvederrorslib/typescript/src/index.d.ts