nodejs-mobile / nodejs-mobile-react-native

Node.js for Mobile Apps React Native plugin
https://nodejs-mobile.github.io
MIT License
174 stars 42 forks source link

Fix patch-package issue with symlinks, use lstatSync instead of statSync #4

Closed Jpoliachik closed 2 years ago

Jpoliachik commented 2 years ago

I was getting errors when building in Xcode:

Error: ENOENT: no such file or directory, stat .../node_modules/.bin/ucat'
    at Object.statSync (fs.js:1016:3)
    at visitPackageJSON
...
Command PhaseScriptExecution failed with a nonzero exit code

Due to patch-package file traversal encountering broken symlinks.

Switching to lstatSync fixed the issue for me. As far as I know, I think it should be a simple drop-in replacement.

staltz commented 2 years ago

Yes, this seems correct. Thank you!

staltz commented 2 years ago

Released v0.6.4: https://github.com/nodejs-mobile/nodejs-mobile-react-native/blob/main/CHANGELOG.md#2021-12-16-version-064-current