ionic build ios --release failed - ios

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

Related

Can't compile Electron app under Windows, node-gyp fails to build cpu-features

My Electron application compiles and packages under MacOS without any problems but when it comes to Windows, I can't seem to make it work.
Here's the debug output:
Error: node-gyp failed to rebuild '[appfolder]\release\app\node_modules\cpu-features'.
For more information, rerun with the DEBUG environment variable set to "electron-rebuild".
Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
at NodeGyp.rebuildModule ([appfolder]\node_modules\electron-rebuild\lib\src\module-type\node-gyp.js:117:19)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async ModuleRebuilder.rebuildNodeGypModule ([appfolder]\node_modules\electron-rebuild\lib\src\module-rebuilder.js:94:9)
at async ModuleRebuilder.rebuild ([appfolder]\node_modules\electron-rebuild\lib\src\module-rebuilder.js:124:14)
at async Rebuilder.rebuildModuleAt ([appfolder]\node_modules\electron-rebuild\lib\src\rebuild.js:145:13)
at async Promise.all (index 7)
at async Rebuilder.rebuild ([appfolder]\node_modules\electron-rebuild\lib\src\rebuild.js:104:13)
at async [appfolder]\node_modules\electron-rebuild\lib\src\cli.js:154:9
Error: Command failed: ..\..\node_modules\.bin\electron-rebuild --parallel --force --types prod,dev,optional --module-dir .
at checkExecSyncError (child_process.js:790:11)
at execSync (child_process.js:863:15)
at Object.<anonymous> ([appfolder]\.erb\scripts\electron-rebuild.js:17:11)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Module.m._compile ([appfolder]\node_modules\ts-node\src\index.ts:1455:23)
at Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Object.require.extensions.<computed> [as .js] ([appfolder]\node_modules\ts-node\src\index.ts:1458:12)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:75:12) {
status: 4294967295,
signal: null,
output: [ null, null, null ],
pid: 2700,
stdout: null,
stderr: null
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! elapp#4.5.0 electron-rebuild: `node -r ts-node/register ../../.erb/scripts/electron-rebuild.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the elapp#4.5.0 electron-rebuild script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\elodie\AppData\Roaming\npm-cache\_logs\2022-04-17T20_38_46_086Z-debug.log
error Command failed with exit code 1.
failedTask=installAppDeps stackTrace=Error: C:\Program Files\nodejs\node.exe exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
Output:
yarn install v1.22.18
[1/4] Resolving packages...
success Already up-to-date.
$ npm run electron-rebuild && npm run link-modules
Tried this with Node v14, 16 and 17 to no avail.
EDIT: Missed the actual error while posting. Here's the error from C++ compilation step:
> elapp#4.5.0 electron-rebuild [appfolder]\release\app
> node -r ts-node/register ../../.erb/scripts/electron-rebuild.js
Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
conpty.cc
conpty.cc
[appfolder]\release\app\node_modules\node-pty\src\win\conpty.cc : fatal error C1083: Cannot open compiler generated file: '[folder]\obj\conpty\src\win\conpty.obj': Permission denied [[appfolder]\release\app\node_modules\node-pty\build\conpty.vcxproj]
path_util.cc
conpty_console_list.cc
win_delay_load_hook.cc
win_delay_load_hook.cc
Creating library [folder]\conpty_console_list.lib and object [folder]\conpty_console_list.exp
Creating library [folder]\conpty.lib and object [folder]\conpty.exp
conpty_console_list.vcxproj -> [folder]\\conpty_console_list.node
conpty.vcxproj -> [folder]\\conpty.node
Agent.cc
conpty_console_list.vcxproj -> [folder]\\conpty_console_list.node
Agent.cc
[appfolder]\release\app\node_modules\node-pty\deps\winpty\src\agent\Agent.cc : fatal error C1083: Cannot open compiler generated file: '[appfolder]\release\app\node_modules\node-pty\build\deps\winpty\src\Release\obj\winpty-agent\deps\winpty\src\agent\Agent.obj': Permission denied [[appfolder]\release\app\node_modules\node-pty\build\deps\winpty\src\winpty-agent.vcxproj]
EDIT 2: Running the same command as an administrator lead to another error:
yarn install v1.22.18
[1/4] Resolving packages...
success Already up-to-date.
$ npm run electron-rebuild && npm run link-modules
> elapp#4.5.0 electron-rebuild C:\Users\elodie\Projects\elapp\release\app
> node -r ts-node/register ../../.erb/scripts/electron-rebuild.js
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Error output:
- Searching dependency tree
The process cannot access the file because it is being used by another process.
The process cannot access the file because it is being used by another process.
gyp: Call to 'cmd /c "cd shared && UpdateGenVersion.bat 2c681018ca7311741a0022e3a170bf60174590b2"' returned exit status 0 while in deps\winpty\src\winpty.gyp. while loading dependencies of binding.gyp while trying to load binding.gyp
× Rebuild Failed
An unhandled error occurred inside electron-rebuild
node-gyp failed to rebuild 'C:\Users\elodie\Projects\elapp\release\app\node_modules\node-pty'.
For more information, rerun with the DEBUG environment variable set to "electron-rebuild".
Error: `gyp` failed with exit code: 1

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 cordova platform add ios" Failed to fetch platform cordova-ios#0.0.1

When I run "ionic cordova platform add ios", that got the following error. How to fix it?
Exception: Using cordova-fetch for cordova-ios#0.0.1
Error: Failed to fetch platform cordova-ios#0.0.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! code ETARGET
npm ERR! notarget No matching version found for cordova-ios#0.0.1
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/thanhnguyen/.npm/_logs/2017-08-25T10_34_19_961Z-debug.log
The following command should resolve the issue:
cordova platform add ios#latest
Inside my package.json there was a ios:0.0.1 which I removed and got resolved.

React Native iOS Deployment Error

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

Resources