Wappler - Cordova Installation Failed


#1

After I have installed Wappler and create a mobile app, I get the following error regarding Cordova being missing (I am using a Mac). Even doing a system check gives me the same error.

Checking NodeJS installation and version…
v8.11.1
NodeJS is correctly installed.

Checking GIT installation and version…
git version 2.16.3
GIT is correctly installed.

Checking Cordova installation and version…
/bin/bash: cordova: command not found
Cordova is missing!

Installing Cordova …
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! path /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules’
npm ERR! { Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules’
npm ERR! stack: ‘Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules’’,
npm ERR! errno: -13,
npm ERR! code: ‘EACCES’,
npm ERR! syscall: ‘access’,
npm ERR! path: ‘/usr/local/lib/node_modules’ }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/paullamacraft/.npm/_logs/2018-07-30T22_40_34_738Z-debug.log
Cordova installation failed!

Thanks in advance,
Paul.


#2

@paul1 It took me the better part of a Saterday night to get around every issue that sprang up with the installation. In this case it seems the following will work:

sudo npm install -g cordova

Install as an admin - so just after this command key in your system password.


#3

Thanks for the reply - that worked fine.

Now when I go to add the iOS to the project I get the following error:

Cordova is correctly installed.

Checking Xcode installation and version…
com.apple.dt.Xcode
Xcode is correctly installed.

Checking ios-sim installation and version…
/bin/bash: ios-sim: command not found
ios-sim is missing!

Installing ios-sim …
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! path /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules’
npm ERR! { Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules’
npm ERR! stack: ‘Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules’’,
npm ERR! errno: -13,
npm ERR! code: ‘EACCES’,
npm ERR! syscall: ‘access’,
npm ERR! path: ‘/usr/local/lib/node_modules’ }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/xxxx/.npm/_logs/2018-07-31T12_12_00_453Z-debug.log
ios-sim installation failed!

Thanks for your time.


#4

If I remember correctly you should open Xcode and install the sims you want to work with, same with Android Studio. Installing multiple sims offers your the option to open an app in a specific sim by adding the device and version to your command line code: This was from a Stack Overflow I read:

To find out what are the simulator images available you can use to list them

$ cordova emulate ios --list

If nothing is there - install throough xcode and then run like this:

cordova emulate ios --target=“iPhone-4s, 9.3”
cordova emulate ios --target=“iPad-Air-2, 9.3”
cordova emulate ios --target=“iPhone-6s, 9.3”
cordova emulate ios --target=“iPhone-6-Plus, 9.3”


#5

Thanks for the reply. I think I am slowly getting there! Now, that appears to be running but end up with the error:

ios-deploy installation failed!

Here is the output of the error:

Checking NodeJS installation and version…
v8.11.1
NodeJS is correctly installed.

Checking GIT installation and version…
git version 2.16.3
GIT is correctly installed.

Checking Cordova installation and version…
8.0.0
Cordova is correctly installed.

Checking Xcode installation and version…
com.apple.dt.Xcode
Xcode is correctly installed.

Checking ios-sim installation and version…
7.0.0
ios-sim is correctly installed.

Checking ios-deploy installation and version…
/bin/bash: ios-deploy: command not found
ios-deploy is missing!

Installing ios-deploy …
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! path /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules’
npm ERR! { Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules’
npm ERR! stack: ‘Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules’’,
npm ERR! errno: -13,
npm ERR! code: ‘EACCES’,
npm ERR! syscall: ‘access’,
npm ERR! path: ‘/usr/local/lib/node_modules’ }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/xxxx/.npm/_logs/2018-07-31T13_35_38_573Z-debug.log
ios-deploy installation failed!


#6

Looks like permission problems. Usually when you see this, just add sudo in front of your command as per 1st instruction. Then enter your password and everything “should” run for that step.


#7

Thanks, but excuse my ignorance I don’t really understand. Everything appears to be working fine until it comes to deploying on iOS where the error appears:

ios-deploy is missing!

It then tries to install with installing iOS-display but results in iOS-deploy installation failed.

Thanks for your time.

PS - This is the error:

Xcode is correctly installed.

Checking ios-sim installation and version…
7.0.0
ios-sim is correctly installed.

Checking ios-deploy installation and version…
/bin/bash: ios-deploy: command not found
ios-deploy is missing!

Installing ios-deploy …
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! path /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules’
npm ERR! { Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules’
npm ERR! stack: ‘Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules’’,
npm ERR! errno: -13,
npm ERR! code: ‘EACCES’,
npm ERR! syscall: ‘access’,
npm ERR! path: ‘/usr/local/lib/node_modules’ }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/xxxx/.npm/_logs/2018-07-31T15_02_14_765Z-debug.log
ios-deploy installation failed!


#8

I have tried a number of things but I am still getting the above errors when trying to deploy In iOS.


#9

installing cordova and the rest of required files is a pain. we could use phonegap build instead
please vote for this feature here


#10

Yes, on my Mac I have everything working fine but for some reason on my MacBook I keep getting the errors mentioned above. It is a nuisance as a lot of the coding I could do on my MacBook and use my Mac for completing the visuals.

I could also use my laptop to test and learn using the extensions.


#11

I have not seen this error… sorry… I searched google and especially stack overflow for solutions to the specific errors. Like I said it took me about 5 hours hitting the curve balls cordova sent my way. With Android studio make sure you have java v1.8 installed and enabled. I could not get it to work with any other version


#12

Normally ios-sim and ios-deploy packages shouldn’t require sudo but seems in your case they do.

So just do:

sudo npm install -g ios-sim
sudo npm install -g ios-deploy


#13

I’m going to “high-jack” this post with another error. I got cordova iinstalled with Framework 7 version 2 and all was working fine. Could build and emulate. I’m not sure if it was 1 version earlier of wappler. Now getting back to the app after 2 weeks, emulate and build does not work with just the basic kitchen sink setup, nothing edited. Any pointers on this error:

(node:9983) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): CordovaError
(node:9983) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.