postinstall script does not work for windows
chuehsien opened this issue · 0 comments
chuehsien commented
Version
- Type of phone: Android
- OS Version: Android Pie
- Model: Oneplus 7T
Steps to reproduce
When runing the dev setup, the last step errors out:
React Native will now be installed.
Press SPACE to continue.
yarn global v1.22.4
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "react-native-cli@2.0.1" with binaries:
- react-native
Done in 0.56s.
yarn install v1.22.4
$ node -e "if(process.env.npm_execpath.indexOf('yarn') === -1) throw new Error('You must use Yarn to install, not NPM')"
[1/4] Resolving packages...
success Already up-to-date.
$ patch-package; npx react-native-jetifier
patch-package 6.2.2
No such package ;
File not found: C:/Users/<user>/Documents/code/react-native/covid-safe-paths/node_modules/;/package.json
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Expected Behavior
I expected the dev_setup.bat to proceed smoothly (it already does! except the last part)
From my debugging, the problem occurs because of the ';' in the postinstall script: "patch-package; npx react-native-jetifier". It works after changing it to &&.
Should be an easy change :)