XCode 12 - Command PhaseScriptExecution failed with a nonzero exit code - ios

Edit: Just created a brand new project, (npx react-native-init), still the same exact issue. No clue what's happening, never had this issue before.
App is building / running file locally. It's only when I archive this issue pops up.
Tried:
Deleting pod file / workspace
Checking 'For install builds only'
Disable / Enable the 'login' in 'Keychain Access'
Cleaning and restarting computer
Archiving in debug and release
Node: 14.16.1 / RN: 0.64.0 / Typescript
What else should I do? Really stuck here. It doesn't make sense it builds fine locally but not in Archive. Thank you.
SyntaxError: Unexpected token {
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:617:28)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/andrewyoung/tacapp/node_modules/react-native/node_modules/#react-native-community/cli/build/commands/doctor/doctor.js:28:21)
Command PhaseScriptExecution failed with a nonzero exit code

Got it - Per this article I used: nvm unalias default and my app is now running.

Related

Openshift build fails only in a specific project (with meteor error)

Using Openshift 4.6.
I'm trying to build an image with a buildConfig, a docker strategy from a binary source (local directory). The buildConfig is generated with the command:
oc new-build . name=build-name --strategy=docker --to=registry-url/image-name:tag --push-secret=secret-name --to-docker.
The build is started with the command:
oc start-build build-name --from-dir=. --wait --follow
The base image is pulled properly and the local Dockerfile starts executing. The dockerfile involves usage of meteor command, and it's okay as the base image contains meteor in /root directory and I'm running everything with --allow-superuser.
When running any meteor command (even --version), the build fails with:
## There is an issue with `node-fibers` ##
`/root/.meteor/packages/meteor-tool/.2.2.0.1jauib.qcbe++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/fibers/bin/linux-x64-57-glibc/fibers.node` is missing.
Try running this to fix the issue: /root/.meteor/packages/meteor-tool/.2.2.0.1jauib.qcbe++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node /root/.meteor/packages/meteor-tool/.2.2.0.1jauib.qcbe++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/fibers/build
SyntaxError: Invalid regular expression
Error: Missing binary. See message above.
at Object.<anonymous> (/root/.meteor/packages/meteor-tool/.2.2.0.1jauib.qcbe++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/fibers/fibers.js:20:8)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/opt/meteor/dist/bundle/programs/server/boot.js:1:75)
at Module._compile (module.js:635:30)
The file fibers.node definitely exists, as when I run in the Dockerfile echo $(ls -la ) it prints fibers.node.
To complicate things more, this problem only occurs when building in a specific project (namespace). When running the same buildConfig, with same secrets, in different projects it works well. Unfortunately, I need this project.
What can be the cause of faulty build in a specific namespace? Otherwise, there are no problen with it and it has more than sufficient resources and limits

yarn run ios - Error: Cannot find module - React Native

So, I'm setting up new React Native project, and I'm trying to setup XCode simulator. I've opened my React Native project in XCode and in the terminal when I run "yarn run ios" from a project folder I'm getting the error "Error: Cannot find module '#babel/runtime/helpers/interopRequireDefault'
at Function.Module._resolveFilename".
My-MacBook-Pro-2:projectZero alexs$ yarn run ios
yarn run v1.13.0
$ react-native run-ios
internal/modules/cjs/loader.js:583
throw err;
^
Error: Cannot find module '#babel/runtime/helpers/interopRequireDefault'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (/Users/alexs/Desktop/React/Native/projectZero/node_modules/react-native/local-cli/cliEntry.js:11:41)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Module._compile (/Users/alexs/Desktop/React/Native/projectZero/node_modules/pirates/lib/index.js:83:24)
at Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Object.newLoader [as .js] (/Users/alexs/Desktop/React/Native/projectZero/node_modules/pirates/lib/index.js:88:7)
at Module.load (internal/modules/cjs/loader.js:599:32)
error Command failed with exit code 1.
Does anybody have an idea how to solve this?
I solved it by running:
yarn add #babel/runtime

Apollo iOS: Command /bin/sh failed with exit code 1 | Command PhaseScriptExecution failed with a nonzero exit code

I follow through installation tutorial by Apollo. And I totally confident that I did everything as is described in installation tutorial. However, when during the build of the project I received the compiler errors like:
TypeError: Cannot read property 'length' of undefined
at Object.yargs.command.command.command.argv [as handler] (/usr/local/lib/node_modules/apollo-codegen/src/cli.js:186:17)
at Object.runCommand (/usr/local/lib/node_modules/apollo- codegen/node_modules/yargs/lib/command.js:235:44)
at Object.parseArgs [as _parseArgs] (/usr/local/lib/node_modules/apollo-codegen/node_modules/yargs/yargs.js:1013:30)
at Object.get [as argv] (/usr/local/lib/node_modules/apollo-codegen/node_modules/yargs/yargs.js:957:21)
at Object.<anonymous> (/usr/local/lib/node_modules/apollo-codegen/lib/cli.js:197:5)
at Module._compile (module.js:660:30)
at Object.Module._extensions..js (module.js:671:10)
at Module.load (module.js:573:32)
at tryModuleLoad (module.js:513:12)
at Function.Module._load (module.js:505:3)
Command /bin/sh failed with exit code 1
and
++ exec apollo-codegen generate --schema schema.json --output API.swift
TypeError: Cannot read property 'length' of undefined
at Object.yargs.command.command.command.argv [as handler] (/usr/local/lib/node_modules/apollo-codegen/src/cli.js:186:17)
at Object.runCommand (/usr/local/lib/node_modules/apollo-codegen/node_modules/yargs/lib/command.js:235:44)
at Object.parseArgs [as _parseArgs] (/usr/local/lib/node_modules/apollo-codegen/node_modules/yargs/yargs.js:1013:30)
at Object.get [as argv] (/usr/local/lib/node_modules/apollo-codegen/node_modules/yargs/yargs.js:957:21)
at Object.<anonymous> (/usr/local/lib/node_modules/apollo-codegen/lib/cli.js:197:5)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
Command PhaseScriptExecution failed with a nonzero exit code
Why I receive this errors?
After spending a lot of time and did searches I understood why errors appeared. Tanks to #NiltiakSivad for her answer on GitHub issue discussion
Apollo script trying to find a file with the extension .graphql in a project folder with appropriates queries or mutations. If they do not exist, probably you will error as above. I think that Apollo team should warn their audience about such possible case in installation tutorial!
So, in order to successfully run the project make sure:
You're Apollo version compatible with apollo-codegen
You correctly add Apollo script
You have schema.json in the project folder
You have file with the extension .graphql in a project folder that
contains appropriates your schema.json query or mutation

phonegap platform add ios - "Unexpected token =>" error

I have a Phonegap app and need to build it in a Mac. Everything works in a machine and I'm trying to configure a new one, but on this, when I run phonegap platform add ios I receive the following error:
$ phonegap platform add ios
/usr/local/lib/node_modules/phonegap/lib/phonegap/util/connect-proxy.js:21
fs.readFile(settings, (err, data) => {
^^
SyntaxError: Unexpected token =>
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/usr/local/lib/node_modules/phonegap/lib/phonegap/serve.js:9:23)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
Both Macs are running with node v0.12.7 and npm 2.11.3.
Apparently phonegap is using ECMAScript 6 Features like Arrow Functions.
I think this is resulting into your error, because you are still using Node v0.12.7, which does not support these features. Installing the latest LTS version from Official Node.js should fixed that.
For further information please have a look at the phonegap requirements.
Please update your node and npm version to solved your problem.

Building electron app fails with Electron packager and electron builder

First of all, I created a tag and build my app with electron-packager:
node_modules/.bin/electron-packager . MyApp --platform=win32 --arch=x64 --icon='/home/user/Desktop/logo.ico' --asar=true --prune --overwrite
It worked fine! The problem is that now, for this release, I create a new tag, but I try to build my app with electron builder instead. I get the following error:
A JavaScript error occurred in the main process Uncaught Exception:
Error: Unable to find a valid app at Object.<anonymous> (E:\Project\dist\win-unpacke
d\resources\electron.asar\browser\init.js:128:9) at Module._compile (module.js:541:3
2) at Object.Module._extensions..js (module.js:550:10) at Module.load (module.js:458
:32) at tryModuleLoad(module.js:417:12) at Function.Module._load (module.js:409:3) a
t Function.Module.runMain (module.js:575:10) at run (bootstrap_node.js:360:7) at sta
rtup (bootstrap_node.js:152:9) at bootstrap_node.js:497:3
Furthermore, I try to build my app again with electron packager, but it didn't work now! I get the same problem.
I checkout my app to the previoulsy working tag, and it neither work.
Unfortunately, the code can not be distributed
Thanks!
The problem was in my package.json.
I miss to add "package.json" file to my files field

Resources