birdofpreyru / react-native-static-server

Embedded HTTP server for React Native
https://dr.pogodin.studio/docs/react-native-static-server
Other
142 stars 22 forks source link

Command PhaseScriptExecution failed with a nonzero exit code #31

Closed tiagomsmagalhaes closed 1 year ago

tiagomsmagalhaes commented 1 year ago

Hello @birdofpreyru

I have found this error yesterday on an existing project, after deciding to update from 0.5.5 to 0.7.7, and deciding to update it, while trying Realm. After getting stuck with upgrades and downgrades, I tried to setup a new project React Native Project and then start moving code from the "older" project to the new one.

Everything seemed to go along until I installed the latest version of this package (I just realised you did a new release). But with the same error Command PhaseScriptExecution failed with a nonzero exit code.

For me it seems weird to have add cmake to the path, when older versions of this package worked out of the box. I'm glad that with the latest versions VSCode doesn't complain about not finding the typings, but something changed in the internals.

Therefore I've downgraded to 0.5.5 which was the version I had before. Later I can check which version is the first to have this issue.

My System MBP15'' 2,6 GHz 6-Core Intel Core i7 Xcode 14.2 macOS Ventura 13.3

I have faced the issue with iOS 15.5 and 16.2 on the iOS Simulators

birdofpreyru commented 1 year ago

Hey @tiagomsmagalhaes , if you are sure it fails for you because of the cmake path issue, then I'll close this ticket in favour of the existing one (#29) to track it.

something changed in the internals.

Well, if you haven't followed the latest developments, TL;DR. is "between v0.5 and v0.7 EVERYTHING changed in the internals". In particular, I have migrated the library to rely on Lighttpd native server on all systems, and that server is written in C, that's how dependency on CMake appeared. Then, I don't do much iOS/macOS development, thus I have the most basic setup of the development environment on my macOS machine — I just installed CMake via Homebrew, I believe; I don't think I did anything else to add it to the path; and I never had this issue with the build failing because of cmake command. Thus, for me figuring out how to correct the build scripts to make them work for everybody is a bit tricky, as I can't reproduce the issue; and also it is not on top of my priorities now, as the issue does not impact me, and also I know other ppl can work it around by adding CMake to the path. I guess, eventually I'll arrive to seriously look into it and fix it, but I really hope before that somebody else, who experiences the problem, will just figure out what is wrong with it, and how it should be fixed.