React Native iOS Deployment Error - ios

The below error occurred while in attempt to deploy my app to the mobile phone for testing.
the app function in the Xcode Simulator, and was able to export to the app into iPhone for testing.
after running the npm start the following error occurred.
while the iPhone app did load but count not connect to development server due to not able to npm start.
And yes both the iPhone and my computer is on the same wireless network.
┌────────────────────────────────────────────────────────────────────────────┐
│ Running packager on port 8081. │
│ │
│ Keep this packager running while developing on any JS projects. Feel │
│ free to close this tab and run your own packager instance if you │
│ prefer. │
│ │
│ https://github.com/facebook/react-native │
│ │
└────────────────────────────────────────────────────────────────────────────┘
Looking for JS files in
/Users/jimmylin/dev/ga/WalkingTour/SohoDuck
[10:40:02 AM] <START> Building Dependency Graph
[10:40:02 AM] <START> Crawling File System
[Hot Module Replacement] Server listening on /hot
React packager ready.
ERROR: Unknown option --no-pretty
ERROR: Unknown option --no-pretty
Watchman: watchman--no-pretty get-sockname returned with exit code 1 ERROR: Unknown option --no-pretty
ERROR watchman--no-pretty get-sockname returned with exit code 1 ERROR: Unknown option --no-pretty
Error: watchman--no-pretty get-sockname returned with exit code 1 ERROR: Unknown option --no-pretty
at ChildProcess.<anonymous> (/Users/jimmylin/dev/ga/WalkingTour/SohoDuck/node_modules/fb-watchman/index.js:198:18)
at emitTwo (events.js:100:13)
at ChildProcess.emit (events.js:185:7)
at maybeClose (internal/child_process.js:850:16)
at Socket.<anonymous> (internal/child_process.js:323:11)
at emitOne (events.js:90:13)
at Socket.emit (events.js:182:7)
at Pipe._onclose (net.js:477:12)
See http://facebook.github.io/react-native/docs/troubleshooting.html
for common problems and solutions.
npm ERR! Darwin 15.3.0
npm ERR! argv "/usr/local/Cellar/node/5.9.1/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v5.9.1
npm ERR! npm v3.7.3
npm ERR! code ELIFECYCLE
npm ERR! SohoDuck#0.0.1 start: `node node_modules/react-native/local-cli/cli.js start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the SohoDuck#0.0.1 start script 'node node_modules/react-native/local-cli/cli.js start'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the SohoDuck package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node node_modules/react-native/local-cli/cli.js start
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs SohoDuck
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls SohoDuck
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/jimmylin/dev/ga/WalkingTour/SohoDuck/npm-debug.log
any suggestion would be greatly appreciated.

Correct installation of dependencies
Uninstall watchman and flow via npm and homebrew
Install watchman and flow only via homebrew
brew install watchman
brew install flow

Related

npm install PATH for postinstall scripts on Jenkins

My JS project uses a NPM package called commitizen:
https://github.com/commitizen/cz-cli
commitizen is added to my devDependencies in package.json file.
commitizen uses internally a package called opencollective as you can see here: https://github.com/commitizen/cz-cli/blob/master/package.json
commitizen on postinstall hook is calling opencollective postinstall which is supposed to run opencollective package binary.
Locally I've no problems running the postinstall hook, however, when I build my project on my Jenkins CI box I get this error when it runs the postinstall hook of commitizen package
sh: 1: opencollective: not found
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! commitizen#2.10.1 postinstall: `opencollective postinstall`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the commitizen#2.10.1 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I tried to add node_modules/opencollective/dist/bin dir to the PATH but with no luck, I think because the opencollective alias is defined in opencollective package.json
Any idea about how to be able to run opencollective command without installing globally opencollective package?
Thank you!

Unable to install appium from npm because of chrome driver installation failure

I have installed nodejs 8.11.1 in my system. Trying to install appium using below npm command.
npm -g install appium
After hitting the command after 10 mnts iam getting below error regarding chrome deiver installation.
C:\Windows\system32>npm -g install appium
C:\Users\fedexuser\AppData\Roaming\npm\appium -> C:\Users\fedexuser\AppData\Roam
ing\npm\node_modules\appium\build\lib\main.js
> appium-chromedriver#3.5.2 install C:\Users\fedexuser\AppData\Roaming\npm\node_
modules\appium\node_modules\appium-chromedriver
> node install-npm.js
info Chromedriver Install Installing Chromedriver version '2.37' for platform 'w
in' and architecture '32'
info Chromedriver Install Opening temp file to write chromedriver_win32 to...
info Chromedriver Install Downloading https://chromedriver.storage.googleapis.co
m/2.37/chromedriver_win32.zip...
RequestError: Error: connect ETIMEDOUT 172.217.0.80:443
at new RequestError (C:\Users\fedexuser\AppData\Roaming\npm\node_modules\app
ium\node_modules\request-promise-core\lib\errors.js:14:15)
at Request.plumbing.callback (C:\Users\fedexuser\AppData\Roaming\npm\node_mo
dules\appium\node_modules\request-promise-core\lib\plumbing.js:87:29)
at Request.RP$callback [as _callback] (C:\Users\fedexuser\AppData\Roaming\np
m\node_modules\appium\node_modules\request-promise-core\lib\plumbing.js:46:31)
at self.callback (C:\Users\fedexuser\AppData\Roaming\npm\node_modules\appium
\node_modules\request\request.js:186:22)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at Request.onRequestError (C:\Users\fedexuser\AppData\Roaming\npm\node_modul
es\appium\node_modules\request\request.js:878:8)
at emitOne (events.js:116:13)
at ClientRequest.emit (events.js:211:7)
at TLSSocket.socketErrorListener (_http_client.js:387:9)
at emitOne (events.js:116:13)
at TLSSocket.emit (events.js:211:7)
at emitErrorNT (internal/streams/destroy.js:64:8)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.2 (node_modules\app
ium\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#
1.2.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}
)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! appium-chromedriver#3.5.2 install: `node install-npm.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the appium-chromedriver#3.5.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional log
ging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\fedexuser\AppData\Roaming\npm-cache\_logs\2018-04-25T10_40
_52_539Z-debug.log
If you are behind a proxy, try to set this before running your npm command
e.g. set HTTP_PROXY=http://[proxy server address]:[port number]
I had also some issues with node 8.x and Appium install via NPM. Did found newly opened Known Issue for Appium 1.8.0 and Node 10.0.0, so had to combine one of the suggestions with extra flags. This fix it for me:
Edited:
sudo npm install -g appium#1.7.2 --unsafe-perm=true --allow-root

How to fix Failed to fetch platform cordova-ios#~4.5.1

I am developing a hybrid app using Ionic 2 and I want to add platform iOS but unable to add platform.
I have also tried to update npm with below command but its not working.
command:
npm update -g
Here is my terminal output below showing the errors I receive, can anyone recommend a solution to resolve this issue?
Using cordova-fetch for cordova-ios#~4.5.1
Error: Failed to fetch platform cordova-ios#~4.5.1
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: npm: Command failed with exit code 1 Error output:
npm ERR! Darwin 17.4.0
npm ERR! argv "/usr/local/bin/node" "/Users/admin/ionic 2/Selfstuff daily/SelfStuff Daily Design/node_modules/npm/bin/npm-cli.js" "install" "cordova-ios#~4.5.1" "--production" "--save-exact"
npm ERR! node v8.9.3
npm ERR! npm v2.15.12
npm ERR! code EPEERINVALID
npm ERR! peerinvalid The package #angular/common#4.1.3 does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer #angular/forms#4.1.3 wants #angular/common#4.1.3
npm ERR! peerinvalid Peer #angular/platform-browser#4.1.3 wants #angular/common#4.1.3
npm ERR! peerinvalid Peer #angular/platform-browser-dynamic#4.1.3 wants #angular/common#4.1.3
npm ERR! peerinvalid Peer angularfire2#2.0.0-beta.7-pre wants #angular/common#^2.0.0
npm ERR! peerinvalid Peer ionic-angular#3.6.1 wants #angular/common#4.1.3
npm ERR! Please include the following file with any support request:
npm ERR! /Users/admin/ionic 2/Selfstuff daily/SelfStuff Daily Design/npm-debug.log
[ERROR] Exception:
You should update all packages to latest version and try again.

ionic build ios --release failed

I'm newer here and i would like a help from you. My english is not very well, but i'm trying to explain my issue.
When i run the ionic build ios --release on my ionic app, and the temrinal shows the below error:
ionic build ios --release
Running 'build:before' npm script before build
> ionic-hello-world# build /Users/allanbarbosa/Projetos/mobi-unidadedigital/v3
> ionic-app-scripts build
[15:37:26] ionic-app-scripts 0.0.28
[15:37:26] build prod started ...
[15:37:26] clean started ...
[15:37:27] clean finished in 62 ms
[15:37:27] copy started ...
[15:37:27] ngc started ...
[15:37:27] lint started ...
[15:37:27] copy finished in 593 ms
[15:37:32] lint finished in 5.18 s
[15:37:51] ngc error: Error: Error at /Users/allanbarbosa/Projetos/mobi-unidadedigital/v3/.tmp/pages/ConsultantChat/consultant-chat.ngfactory.ts:432:42: Property 'cleanFilter' does not exist on type 'ConsultantChat'.
Error at /Users/allanbarbosa/Projetos/mobi-unidadedigital/v3/.tmp/pages/Estatisticas/components/PointsResume/points-resume.ngfactory.ts:552:40: Property 'accordeon' is private and only accessible within class 'PointsResume'.
Error at /Users/allanbarbosa/Projetos/mobi-unidadedigital/v3/.tmp/pages/Estatisticas/components/PointsResume/points-resume.ngfactory.ts:557:40: Property 'animaAccordeon' is private and only accessible within class 'PointsResume'.
Error at /Users/allanbarbosa/Projetos/mobi-unidadedigital/v3/.tmp/pages/Estatisticas/components/PointsResume/points-resume.ngfactory.ts:562:40: Property 'accordeon' is private and only accessible within class 'PointsResume'.
Error at /Users/allanbarbosa/Projetos/mobi-unidadedigital/v3/.tmp/pages/Estatisticas/components/PointsResume/points-resume.ngfactory.ts:567:45: Property 'accordeon' is private and only accessible within class 'PointsResume'.
Error at /Users/allanbarbosa/Projetos/mobi-unidadedigital/v3/.tmp/pages/Estatisticas/estatistica.ngfactory.ts:552:42: Property 'ConsultantChat' does not exist on type 'EstatisticaPage'.
Error at /Users/allanbarbosa/Projetos/mobi-unidadedigital/v3/.tmp/pages/ModalAccount/modal-account.ngfactory.ts:325:29: Supplied parameters do not match any signature of call target.
at check (/Users/allanbarbosa/Projetos/mobi-unidadedigital/v3/node_modules/#angular/tsc-wrapped/src/tsc.js:31:15)
at Tsc.typeCheck (/Users/allanbarbosa/Projetos/mobi-unidadedigital/v3/node_modules/#angular/tsc-wrapped/src/tsc.js:86:9)
at /Users/allanbarbosa/Projetos/mobi-unidadedigital/v3/node_modules/#angular/tsc-wrapped/src/main.js:33:23
at process._tickCallback (internal/process/next_tick.js:103:7)
at Function.Module.runMain (module.js:577:11)
at startup (node.js:160:18)
at node.js:456:3
[15:37:51] ngc error: Compilation failed
[15:37:51] ngc failed: NGC encountered an error
[15:37:51] Error: NGC encountered an error
at ChildProcess.<anonymous> (/Users/allanbarbosa/Projetos/mobi-unidadedigital/v3/node_modules/#ionic/app-scripts/dist/ngc.js:60:24)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:852:16)
at Socket.<anonymous> (internal/child_process.js:323:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at Pipe._handle.close [as _onclose] (net.js:492:12)
Error running ionic app script "build": Error: NGC encountered an error
npm
ERR! Darwin 16.1.0
npm
ERR! argv "/usr/local/Cellar/node/6.2.1/bin/node" "/usr/local/bin/npm" "run" "build"
npm ERR!
node v6.2.1
npm ERR! npm v3.10.8
npm ERR! code ELIFECYCLE
npm ERR!
ionic-hello-world# build: `ionic-app-scripts build`
npm ERR!
Exit status 1
npm ERR!
npm ERR!
Failed at the ionic-hello-world# build script 'ionic-app-scripts build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ionic-hello-world package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ionic-app-scripts build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ionic-hello-world
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls ionic-hello-world
npm
ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR!
/Users/allanbarbosa/Projetos/mobi-unidadedigital/v3/npm-debug.log
Caught exception:
undefined
I trying to search on my pages this ngc problems, but no successful. Someone can help me?
My ionic info
Your system information:
Cordova CLI: 6.4.0
Gulp version: CLI version 3.9.1
Gulp local:
Ionic Framework Version: 2.0.0-rc.0
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.1.0-beta.1
ios-deploy version: 1.9.0
ios-sim version: 5.0.8
OS: Mac OS X El Capitan
Node Version: v6.2.1
Xcode version: Xcode 8.1 Build version 8B62

OSX Yosemity Webstorm npm install -g iOS-sim

So I have been trying for the last 3 hours to get web storm set up on my new mac. I'm having trouble getting the iOS-sim set up and it just gives me an error
Failed at the ios-sim#3.1.1 preinstall script 'rake build'.
npm ERR! This is most likely a problem with the ios-sim package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! rake build
npm ERR! You can get their info via:
npm ERR! npm owner ls ios-sim
npm ERR! There is likely additional logging output above.
I've tried every google link out there and I still am at a loss.
Any thoughts?
Here is an error message I get when installing phonegap
Brentons-MBP:~ brentonpierce$ sudo npm install -g phonegap
Password:
npm WARN engine npm#1.3.4: wanted: {"node":">=0.6","npm":"1"} (current: {"node":"0.12.3","npm":"2.7.5"})
npm WARN engine cordova-js#3.9.0: wanted: {"node":"~0.10.x"} (current: {"node":"0.12.3","npm":"2.7.5"})
npm WARN engine xmlbuilder#2.2.1: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"0.12.3","npm":"2.7.5"})
> ws#0.4.31 install /usr/local/lib/node_modules/phonegap/node_modules/connect-phonegap/node_modules/socket.io/node_modules/engine.io/node_modules/ws > (node-gyp rebuild 2> builderror.log) || (exit 0)
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
npm WARN installMany normalize-package-data was bundled with npm#1.3.4, but bundled package wasn't found in unpacked tree
> ws#0.4.31 install /usr/local/lib/node_modules/phonegap/node_modules/connect-phonegap/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws > (node-gyp rebuild 2> builderror.log) || (exit 0)
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o /usr/local/bin/phonegap -> /usr/local/lib/node_modules/phonegap/bin/phonegap.js
phonegap#5.0.0-0.28.0 /usr/local/lib/node_modules/phonegap
├── pluralize#0.0.4
├── colors#0.6.0-1
├── semver#1.1.0
├── minimist#0.1.0
├── qrcode-terminal#0.9.4
├── shelljs#0.1.4
├── phonegap-build#0.9.1 (colors#0.6.2, qrcode-terminal#0.8.0, shelljs#0.0.9, optimist#0.3.7, phonegap-build-api#0.3.3)
├── prompt#0.2.11 (revalidator#0.1.8, pkginfo#0.3.0, read#1.0.5, winston#0.6.2, utile#0.2.1)
├── cordova#5.0.0 (underscore#1.7.0, q#1.0.1, nopt#3.0.1, cordova-lib#5.0.0)
└── connect-phonegap#0.16.0 (home-dir#0.1.2, connect-inject#0.3.2, ip#0.3.1, walkdir#0.0.8, request-progress#0.3.1, shelljs#0.2.6, http-proxy#1.8.1, request#2.33.0, tar#0.1.19, node-static#0.7.0, gaze#0.4.3, localtunnel#1.3.0, archiver#0.14.3, useragent#2.0.8, connect#2.12.0, socket.io#1.0.4)
Xcode 6 is required for ios-sim to work.
Please check that you have it installed.
If it is installed, run it at least once.

Resources