History log of /expo/packages/expo-module-scripts/bin/npx (Results 1 – 3 of 3)
Revision Date Author Comments
# d295e37d 24-May-2023 Tomasz Sapeta <[email protected]>

[scripts] Fix npx script failing when yarn is not installed (#22582)


# a41b516d 22-Nov-2022 Brent Vatne <[email protected]>

[emc] Remove --silent for compat with yarn v3


# 6d2045be 26-Oct-2018 James Ide <[email protected]>

[scripts] Run `npx` through `yarn exec` when run via npm instead of Yarn

`npm publish` would fail because `npx` would install `tsc` from npm instead of using the copy installed in the workspace root

[scripts] Run `npx` through `yarn exec` when run via npm instead of Yarn

`npm publish` would fail because `npx` would install `tsc` from npm instead of using the copy installed in the workspace root's `node_modules/.bin` directory. In contrast, Yarn adds the workspace root's `.bin` directory and cwd's `.bin` directory to `$PATH` so we find our locally installed copy of `tsc`.

To remedy this difference between Yarn and npm, we want to set up `$PATH` the same way Yarn does even when using npm. Yarn exposes a command called `yarn exec` that does this, so in `expo-module-scripts` we now use `yarn exec -- npx` instead of `npx` when we detect that we're run via npm instead of Yarn.

Test plan: run `npm pack` in the expo package and verify it works.

show more ...