Using this version of Cordova with older version of cordova-ios is deprecated. Upgrade to cordova-ios#4.0.0 or newer.
Error: Your ios platform does not have Api.js
sh-3.2# cordova --version
7.0.1
sh-3.2# ionic cordova build ios
> ionic cordova prepare
✖ cordova prepare - failed!
[ERROR] An error occurred while running cordova prepare (exit code 1):
Discovered plugin "it.mobimentum.phonegapspinnerplugin" in config.xml. Adding it to the project
Failed to restore plugin "it.mobimentum.phonegapspinnerplugin" from config.xml. You might need to try adding it
again. Error: Error: Registry returned 404 for GET on
https://registry.npmjs.org/it.mobimentum.phonegapspinnerplugin
sh-3.2# cordova platform version ios
Installed platforms:
android 5.2.2
browser 4.1.0
ios 4.4.0
Available platforms:
blackberry10 ~3.8.0 (deprecated)
osx ~4.0.1
webos ~3.7.0
As per the LuminousEagle's answer I have tried to add and remove platforms by doing
cordova platform rm ios
cordova platform add ios
than again i run command
ionic cordova build ios
And still having error
sh-3.2# ionic cordova build ios
> ionic cordova prepare
✖ cordova prepare - failed!
[ERROR] An error occurred while running cordova prepare (exit code 1):
Discovered plugin "it.mobimentum.phonegapspinnerplugin" in config.xml. Adding it to the project
Failed to restore plugin "it.mobimentum.phonegapspinnerplugin" from config.xml. You might need to try adding it
again. Error: Error: Registry returned 404 for GET on
https://registry.npmjs.org/it.mobimentum.phonegapspinnerplugin
So, the plugin named "it.mobimentum.phonegapspinnerplugin" is not installing.
After searching a bit i found plugin github url
from Usage section I have tried to install a plugin by doing
cordova plugin add https://github.com/mobimentum/phonegap-plugin-loading-spinner.git
It still shows an error
sh-3.2# cordova plugin add https://github.com/mobimentum/phonegap-plugin-loading-spinner.git
Error: Failed to fetch plugin https://github.com/mobimentum/phonegap-plugin-loading-spinner.git via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: npm: Command failed with exit code 235 Error output:
npm ERR! addLocal Could not install /tmp/npm-2500-e6f21046/git-cache-49279488/feeaeb845cd544e5875d75ff21d0504e50d315a4
npm ERR! Darwin 16.7.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "https://github.com/mobimentum/phonegap-plugin-loading-spinner.git" "--save"
npm ERR! node v6.11.1
npm ERR! npm v3.10.10
npm ERR! code EISDIR
npm ERR! errno -21
npm ERR! syscall read
npm ERR! eisdir EISDIR: illegal operation on a directory, read
npm ERR! eisdir This is most likely not a problem with npm itself
npm ERR! eisdir and is related to npm not being able to find a package.json in
npm ERR! eisdir a package you are trying to install.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/plutus/Desktop/Croisiere-ios-3/node_modules/npm-debug.log
I dont find any proper way to get out of this issue.
Any help would be appreciated thank you in advanced.
Related
I am trying to install APPIUM on my machine and want to run it in actual device, for that i have to install the command 'npm install -g ios-deploy'
but when i am trying to install it is dispalying the error.
Error:
he following build commands failed:
PhaseScriptExecution Run\ Script build/ios-deploy.build/Release/ios-deploy.build/Script-C0CD3D981F59D20100F954DB.sh
(1 failure)
npm ERR! code ELIFECYCLE
npm ERR! errno 65
npm ERR! ios-deploy#1.9.2 preinstall: ./src/scripts/check_reqs.js && xcodebuild
npm ERR! Exit status 65
npm ERR!
npm ERR! Failed at the ios-deploy#1.9.2 preinstall 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! /Users/synerzip/.npm/_logs/2018-07-21T10_30_21_090Z-debug.log
syn-macmini-03:~ synerzip$ xcodebuild
xcodebuild: error: The directory /Users/synerzip does not contain an Xcode project.
Solution Tried:
sudo npm install -g ios-deploy
npm install -g ios-deploy --unsafe-perm=true
npm install -g ios-deploy --allow-root
Details:
OS: 1.13.6
xcode version: 9.4.1
node version: v10.7.0
Note
when i run the command 'xcode-select --print-path' following path display,
"/Applications/Xcode.app/Contents/Developer"
Can Any help me on this.
Thanks.
I have tried the following steps sequentially and it works for me.
sudo npm uninstall -g ios-deploy
brew install ios-deploy
#Paul - Thanks for looking in it.
I have Fixed it with following STEPS...
(Ignore steps if you have already done it)
Debug on real iOS device iONIC App
Install brew( with command on terminal ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”)
Install Xcode
Run sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
Install iOS-deploy (brew install ios-deploy)
Build iOS with ionic cordova build ios --buildFlag="-UseModernBuildSystem=0"
Go to Xcode and set provisioning profile certificate
Attach device and run command on terminal ionic cordova run ios --buildFlag="-UseModernBuildSystem=0"
First it will fail as you need to Go to setting—>General -.>Device management->Click on your development certificate->Trust.
Done now you can run your ionic app on your real iOS device directly with just ionic cordova run ios --buildFlag="-UseModernBuildSystem=0"
Cheers!!!!!!!!!
To use ios-deploy as a command-line tool it is recommended you now install it directly via Homebrew(and if you have already installed it via npm to uninstall it).
https://github.com/ios-control/ios-deploy#installation
The Homebrew and npm versions will be updated at the same time going forward.
I could fix the problem by installing the "Xcode 10 beta 4" on my computer.
Another solution is provided on GitHub - check out the following links.
https://github.com/ios-control/ios-deploy/issues/346
https://github.com/ios-control/ios-deploy/issues/349#issuecomment-405937763
After the below command
$ npm uninstall -g ios-deploy
You should restart your command line. And than you can run below line on command line.
$ brew upgrade ios-deploy
When I use the "cordova platform add ios" command for the latest Cordova version which is 7.0.1, I receive a failed to fetch message.
I am trying to upgrade an existing project to iOS version 4.4.0 but for my peace of mind, I tried creating a fresh project which also had the same error.
Here is my terminal output below showing the errors I receive, can anyone recommend a solution to resolve this issue?
Stuarts-MacBook-Pro:T Stu$ cordova create myApp org.apache.cordova.myApp myApp
Creating a new cordova project.
Stuarts-MacBook-Pro:T Stu$ cd myApp
Stuarts-MacBook-Pro:myApp Stu$ cordova platform add ios
Using cordova-fetch for cordova-ios#~4.4.0
Error: Failed to fetch platform cordova-ios#~4.4.0
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Failed to get absolute path to installed module
Stuarts-MacBook-Pro:myApp Stu$ cordova platform add ios
Using cordova-fetch for cordova-ios#^4.4.0
Error: Failed to fetch platform cordova-ios#^4.4.0
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 254 Error output:
npm WARN org.apache.cordova.myapp#1.0.0 No repository field.
npm ERR! Darwin 16.0.0
npm ERR! argv "/usr/local/Cellar/node/6.2.0/bin/node" "/usr/local/bin/npm" "install" "cordova-ios#^4.4.0" "--save"
npm ERR! node v6.2.0
npm ERR! npm v3.8.9
npm ERR! path /Users/S/Development/T/myApp/node_modules/.staging/xml-escape-d330e1e1
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/Users/S/Development/T/myApp/node_modules/.staging/xml-escape-d330e1e1' -> '/Users/S/Development/T/myApp/node_modules/cordova-ios/node_modules/xml-escape'
I have resolved this, it appears to be an NPM issue and not a Cordova one. I just updated NPM within Terminal and after the update "cordova platform add ios" worked fine. Happy days - 1 !
npm update -g
Delete the folder cordova-ios, located in node_modules/cordova-ios.
Type the following command
ionic cordova build ios
Sometimes a previously added Platform is not removed Properly, so this type of issue occurs. Remove the platform by command and add it again..
Follow this steps:
Run the command
ionic cordova platform remove ios
Run the command:
ionic cordova platform add ios --save
If you are still getting the issue, try running again:
ionic cordova platform remove ios --save
NOTE: By running again the command ionic cordova platform remove ios --save fetches newer version of ios platform.
For example:
First time: cordova-fetch for cordova-ios#~4.5.1
Second time: cordova-fetch for cordova-ios#~4.5.4
I am trying to set up for the react native. but whenever I update files it gives m error
enoent ENOENT: no such file or directory, open 'React Native/package.json'
npm WARN react-native#0.26.3 requires a peer of react#15.0.2 but none was installed.
npm WARN React Native No description
npm WARN React Native No repository field.
npm WARN React Native No README data
npm WARN React Native No license field.
MacBook-Pro:React Native$ npm info react dist-tags.latest
Please let me know how can I fix.
Installing react should fix the error
npm install react --save
Also, you may try upgrading your react-native install. react-native is as v0.30.0 now
npm update react-native
In my specific case I was running npm install in the wrong directory. I thought I was in my project directory but was one level higher. This meant react was missing from installed packages (because there were none) and thus gave this error.
Some steps that worked for me:
1. watchman watch-del-all
2. rm -rf node_modules
3. npm install react#15.0.2 --save
4. npm install react#15.1.0 --save
5. npm install
6. rm -fr $TMPDIR/react-*
7. npm start -- --reset-cache
In my case, the project I am working on requires a specific version of React. Since it was older than the current release, doing an install/update would still cause the error.
In order to fix the problem, I had to check the package.json of the project and install the exact version allowed by the dependency definition. In the OP's case, a
npm install react#15.0.2
should fix the problem by installing the exact version of the React module that react-native requires.
Verify that the condition was resolved by doing a npm list to see if there are any other unmet peer dependencies.
I have tried installing appium 1.5 released version on windows 7 , 8 and 10 , I am getting the following error
`
appium-chromedriver#2.8.0 install C:\Users\achauhan\AppData\Roaming\npm\no
odules\appium\node_modules\appium-chromedriver
node install-npm.js
Error trying to install Chromedriver binary. Waiting and trying again. Error trying to install Chromedriver binary. Waiting and trying again. Error trying to install Chromedriver binary. Waiting and trying again. Error trying to install Chromedriver binary. Waiting and trying again. Error trying to install Chromedriver binary. Waiting and trying again. Error trying to install Chromedriver binary. Waiting and trying again. Error trying to install Chromedriver binary. Waiting and trying again. Error trying to install Chromedriver binary. Waiting and trying again. Error trying to install Chromedriver binary. Waiting and trying again. Error trying to install Chromedriver binary. Waiting and trying again. Error trying to install Chromedriver binary. Waiting and trying again. Error trying to install Chromedriver binary. Waiting and trying again. Error trying to install Chromedriver binary. Waiting and trying again. Error trying to install Chromedriver binary. Waiting and trying again. Error trying to install Chromedriver binary. Waiting and trying again. Error trying to install Chromedriver binary. Waiting and trying again. Error trying to install Chromedriver binary. Waiting and trying again. info Chromedriver Install Installing Chromedriver version '2.21' for platfor in' and architecture '32' info Chromedriver Install Opening temp file to write chromedriver_win32 to.. info Chromedriver Install Downloading http://chromedriver.storage.googleapis /2.21/chromedriver_win32.zip... info Chromedriver Install Writing binary content to C:\Users\achauhan\AppDat cal\Temp\201621-7524-1cn5kzj\chromedriver_win32.zip... info Chromedriver Install Extracting C:\Users\achauhan\AppData\Local\Temp\20
-7524-1cn5kzj\chromedriver_win32.zip to C:\Users\achauhan\AppData\Local\Temp 621-7524-1cn5kzj\chromedriver_win32 info Chromedriver Install Creating C:\Users\achauhan\AppData\Roaming\npm\nod dules\appium\node_modules\appium-chromedriver\chromedriver\win... info Chromedriver Install Copying unzipped binary, reading from C:\Users\ach n\AppData\Local\Temp\201621-7524-1cn5kzj\chromedriver_win32\chromedriver.exe info Chromedriver Install Writing to C:\Users\achauhan\AppData\Roaming\npm\n modules\appium\node_modules\appium-chromedriver\chromedriver\win\chromedrive e... info Chromedriver Install C:\Users\achauhan\AppData\Roaming\npm\node_modules ium\node_modules\appium-chromedriver\chromedriver\win\chromedriver.exe succe lly put in place
appium-selendroid-driver#1.2.2 install C:\Users\achauhan\AppData\Roaming\n
ode_modules\appium\node_modules\appium-selendroid-driver
node ./bin/install.js
info SelendroidInstaller Ensuring C:\Users\achauhan\AppData\Roaming\npm\node ules\appium\node_modules\appium-selendroid-installer\selendroid\download exi info SelendroidInstaller Downloading Selendroid standalone server version 0. from https://github.com/selendroid/selendroid/releases/download/0.17.0/sele id-standalone-0.17.0-with-dependencies.jar --> C:\Users\achauhan\AppData\Roa \npm\node_modules\appium\node_modules\appium-selendroid-installer\selendroid nload\selendroid-server.jar info SelendroidInstaller Writing binary content to C:\Users\achauhan\AppData ming\npm\node_modules\appium\node_modules\appium-selendroid-installer\selend \download\selendroid-server.jar info SelendroidInstaller Selendroid standalone server downloaded info SelendroidInstaller Determining AndroidManifest location Error: Command 'jar tf C:\Users\achauhan\AppData\Roaming\npm\node_modu \appium\node_modules\appium-selendroid-installer\selendroid\download\se roid-server.jar' errored out: Error: spawn jar ENOENT at exports._errnoException (util.js:870:11) at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32 at onErrorNT (internal/child_process.js:344:16) at nextTickCallbackWith2Args (node.js:441:9) at process._tickCallback (node.js:355:17) at ChildProcess. (lib/teen_process.js:31:14) at emitOne (events.js:77:13) at ChildProcess.emit (events.js:169:7) at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12 at onErrorNT (internal/child_process.js:344:16) at nextTickCallbackWith2Args (node.js:441:9) at process._tickCallback (node.js:355:17) npm ERR! Windows_NT 6.3.9600 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\node node_modules\npm\bin\npm-cli.js" "install" "-g" "appium" npm ERR! node v4.2.6 npm ERR! npm v2.14.12 npm ERR! code ELIFECYCLE
npm ERR! appium-selendroid-driver#1.2.2 install: node ./bin/install.js npm ERR! Exit status 1 npm ERR!
**npm ERR! Failed at the appium-selendroid-driver#1.2.2 install script 'node . /install.js'. npm ERR! This is most likely a problem with the appium-selendroid-driver pac , npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node ./bin/install.js npm ERR! You can get their info via: npm ERR! npm owner ls appium-selendroid-driver npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:** npm ERR! C:\Users\achauhan\npm-debug.log`
Verify that %JAVA_HOME%\bin is in PATH - it worked for me after adding this.
(JAVA_HOME contains the JDK root path.)
The issue with installation occurs when installing appium-selendroid-driver#1.2.2.
Install a Java Developer Kit, and this dependency should install correctly.
I was able to install it after following below steps
Uninstall Appium GUI version
Go to c:\Users\xxxxx
use force command like
npm install -f appium
You will find appium gets installed on
C:\Users\XXXXXXX\node_modules.bin
All you have to do is now bind it to an environement varriable
You can then open command prompt and type appium to start it
I came across a post talking about a similar problem. It was fixed by using another server jar file selendroid-standalone-0.17.0-with-dependencies_fixed.jar. It might be worth to try it.
I have installed nodejs version 5.0.0 and npm 3.3.6 on my MacBook pro. Every time i try to install ionic i get the following error:
npm ERR! Darwin 15.0.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "ionic"
npm ERR! node v5.0.0
npm ERR! npm v3.3.6
npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! syscall read
How can i fix this ?
After reading the Cordova API CLI requirements on OSX. i found out that i need the have all iOS SDK tools which is part of XCode installation.
Cordova CLI requirements for OSX:
http://cordova.apache.org/docs/en/5.1.1/guide/platforms/ios/index.html
So this is the steps to get Ionic up and running on OSX ElCapitan 10.11.1 and to fix the issue i had earlier:
1) Download and then Install XCode on your OSX.
2) Run the following command in your terminal:
sudo npm install -g cordova ionic
3) You will be able to install both Cordova and Ionic on your machine with no errors as it was showing earlier.
4) Try to create a project to validate everything is good to go in the terminal window:
ionic start mostafaApp1 tabs
You will find that the project has been created successfully.
Hope this helps.
I use to have the exact same error.
In the Installation Guide from ionic (http://ionicframework.com/docs/v2/getting-started/installation/) explains that you need a Node.js version 6 or greater to install ionic.
I fixed it by upgrading my Node.js to the current version "v6.8.0", and then my installation from ionic work without errors! :)
You can download the latest version from Node.js from the official website: "https://nodejs.org/en/"