I'm starting to learn React Native. I tried to install it from what I read from the documentation. It works flawlessly on Android. After installing the project, I run the 'xcworkspace' file in the ios folder, but I get an error.
This is the error I got => Command PhaseScriptExecution failed with a nonzero exit code
When I run the project from the console with the following code "npx react-native run-ios" I get the following error.
warning: Run script build phase 'Bundle React Native code and images' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'AwesomeProject' from project 'AwesomeProject')
warning: Run script build phase 'Start Packager' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'AwesomeProject' from project 'AwesomeProject')
** BUILD FAILED **
The following build commands failed:
PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/omerulusoy/Library/Developer/Xcode/DerivedData/AwesomeProject-bzsmyrhehnlgrpbitthszribdkvm/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-46EB2E00018F30.sh (in target 'FBReactNativeSpec' from project 'Pods')
(1 failure)
I entered the ios folder and ran the following code 'pod deintegrate' and then this code 'pod install' but I still get the error.
I tried installing older versions of React, but this time I got different errors.
One of the errors I got => 'Typedef redefinition with different types ('uint8_t' (aka 'unsigned char') vs 'enum clockid_t')'
Related
I don't know where everything went wrong but at some point, my react app started showing only a blank screen. I've look into some tuto and afterward, I've realize that when I run the command npm run build, I get the following error :
Failed to compile.
The target environment doesn't support dynamic import() syntax so it's not possible to use external type 'module' within a script
Devs, why would 'react-scripts build' command show "import" and "default export" errors on the Linux but not on the Mac? Same codebase. Is there a config or environmental var that allows you to ignore errors in jsx files during this process?
My issue is that I have the same codebase that I am trying to get setup on both a Mac and a Linux, both computer have the same package versions installed, use the same command to run (i.e. npm start). My issue is that while the program can get up and running on the Mac just fine, on Linux it stops right after installing dependencies... line, indicating that there is some error that is preventing the program from running fully, both programs are being run from Visual Studio Code.
A suspicion of a friend is that there is some configuration setup possible on the Mac that is forcing the build script to ignore certain errors during the build process, thereby allowing the program to run despite having errors. This appears to have been confirmed when I once found a random error in the react code - fixed it - attempted to run the script again and it stopped due to a different error. While I don't have time to run through the entire codebase looking for small errors like this, I would be interested know if there is such a script that is forcing the react build to ignore said errors and if so where can I locate it on Windows/Linux and fix it?
Thanks again!
I decided to change the name of my React Native project by first changing it in the main directory to name it "AppName" by getting rid of its previous name.
I also changed all the folders names inside my ios into AppName and got rid of its previous name.
Even inside the index.ios.js, I got rid of its previous name.
However, whenever I run react-native run-ios, I get the following error:
Installing build/Build/Products/Debug-iphonesimulator/AppName.app
An error was encountered processing the command
(domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier
build/Build/Products/Debug-iphonesimulator/AppName.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Why am I getting this error? I know it has something to do with changing the name of my project.
to rename react native project you should use react-native-rename
because manual rename will break your project
I am currently trying to generate native versions of a small meteor app I built. When I run them on iOS or Android via the meteor run command it works and meteor build with --debug also generates an ipa/apk that works as expected. But when I run meteor build without --debug the web view only shows a white screen. Using remote debugging I noticed an injector error. I was wondering why and checked the apk/ipa content. There I recognized that in the debug version under assets/www/application/packages there is a bunch of .js and .js.map files which simply is not there in the non-debug ipa/apk.
In the index.html of the non-debug ipa/apk the imports of these files are also missing.
How can I tell meteor to just copy these obviously required files for non-debug?
When you build, Meteor concatenates and minifies all the JS files into a single bundle, same as Browserify and webpack are doing. That is why you do not see all the script imports.
It does not do it in debug to facilitate live reload / hot code push while you are developing, besides facilitating debugging​ obviously.
See the Meteor guide on building for production.
If you believe this difference causes some issue, you can simulate it in development using the --production flag after meteor run.
This addresses your titled and last question, but may not fix in itself your initial issue.
I have a couple of projects that use Karma to run Jasmine unit tests. We're using npm for package management and Grunt for building our JavaScript projects and executing their unit test tasks. After committing, these projects are built automatically via Jenkins jobs.
On Windows, my projects build successfully. When Jenkins runs the builds on Linux, however, I randomly will see unit test failures that seem to be caused by a previous version of my file being referenced.
For example, I have a class that previously called:
alert('Cannot retrieve report with the following url: report');
It was recently changed to call:
alert('There was an error trying to retrieve report with ID: 123');
When I run my unit tests locally on Windows, every test runs successfully. When Jenkins runs them on Linux, the tests fail with this output:
Expected spy alert to have been called with [ 'There was an error
trying to retrieve report with ID: 123' ] but actual calls were [
'Cannot retrieve report with the following url: report' ]
It seems that somewhere the old version of my file is being referenced. Is it possible that somewhere something (Jenkins, a Node module, etc.) is caching my files?
I've verified that my Jenkins workspace contains the correct versions of the files for which the unit tests are failing. I've also removed any tildes from my package.json and used npm shrinkwrap to ensure that I have full control of my dependencies. I've wiped my workspace several times and created multiple jobs, but I can't seem to rid myself of this problem.