feat(builder-bob): dont use npm bin to get tsc path #435
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Closes #434
The builder bob typescript build phase uses
yarn bin
andnpm bin
commands to locate thetsc
. However, thenpm bin
command is removed with npm 9.0. Please see: https://github.blog/changelog/2022-10-24-npm-v9-0-0-released/Test plan
packages/react-native-builder-bob
yarn prepack
to build the builder bob.npm link
npx create-react-native-library@latest my-awesome-project
. You can selectjavascript
as the type.npm link react-native-builder-bob
to link the project.Resolve
tsc
automaticallynpm run prepack
to verify the typescript compilation step works properly.yarn prepack
to verify the typescript compilation step works properly.pnpm prepack
to verify the typescript compilation step works properly.Resolve
tsc
using the builder bob configpackage.json
file of the project you've generated.react-native-builder-bob
section and specify the tsc binary as following: (thetsc
line needs to be added.)npm run prepack
to verify the typescript compilation step works properly.yarn prepack
to verify the typescript compilation step works properly.pnpm prepack
to verify the typescript compilation step works properly.