Mobile App Build and environment

Mobile App Build and environment

by Jim H -
Number of replies: 5

Hi all

About a year or so ago I was able to create a custom mobile app using the instructions provided and setting up the development environment as described. I am just trying again with the latest app build but am running into problems.

Installing Python on my Windows 10 machine helped with an initial error but I'm still having an issue when running npm install in the app directory. I'm now not sure if the rest of my environment is now correct (node.js 0.12.7 and npm 2.11.3)

The error is as follows (apologies for the length of text!):

Your environment has been set up for using Node.js 0.12.7 (x64) and npm.


c:\Users\Jim H\Documents\GitHub\moodapp2>npm install

npm WARN package.json mm2@1.0.0 No repository field.

npm WARN package.json mm2@1.0.0 No license field.

npm WARN deprecated gulp-minify-css@0.3.13: Please use gulp-clean-css

npm WARN engine appium@1.6.4: wanted: {"node":">=4","npm":">=3"} (current: {"node":"0.12.7","npm":"2.11.3"})

npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

npm WARN optional dep failed, continuing fsevents@1.1.1

npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.

npm WARN deprecated node-uuid@1.4.8: Use uuid module instead

npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

-

> ws@0.4.32 install c:\Users\Jim H\Documents\GitHub\moodapp2\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws

> (node-gyp rebuild 2> builderror.log) || (exit 0)



c:\Users\Jim H\Documents\GitHub\moodapp2\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node  rebuild )

Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.

  bufferutil.cc

     Creating library c:\Users\Jim H\Documents\GitHub\moodapp2\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\Release\bufferutil.lib and object c:\Users\Jim H\Documents\GitHub\moodapp2\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules

  \ws\build\Release\bufferutil.exp

  Generating code

  Finished generating code

  bufferutil.vcxproj -> c:\Users\Jim H\Documents\GitHub\moodapp2\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\Release\\bufferutil.node

  validation.cc

     Creating library c:\Users\Jim H\Documents\GitHub\moodapp2\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\Release\validation.lib and object c:\Users\Jim H\Documents\GitHub\moodapp2\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules

  \ws\build\Release\validation.exp

  Generating code

  Finished generating code

  validation.vcxproj -> c:\Users\Jim H\Documents\GitHub\moodapp2\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\Release\\validation.node

npm WARN deprecated npmconf@2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm

npm WARN deprecated pangyp@2.3.3: use node-gyp@3+ instead

npm WARN engine request@2.81.0: wanted: {"node":">= 4"} (current: {"node":"0.12.7","npm":"2.11.3"})

npm WARN engine har-validator@4.2.1: wanted: {"node":">=4"} (current: {"node":"0.12.7","npm":"2.11.3"})

npm WARN engine xmlbuilder@9.0.0: wanted: {"node":">=6.0"} (current: {"node":"0.12.7","npm":"2.11.3"})

npm WARN engine har-schema@1.0.5: wanted: {"node":">=4"} (current: {"node":"0.12.7","npm":"2.11.3"})

npm WARN deprecated to-iso-string@0.0.2: to-iso-string has been deprecated, use @segment/to-iso-string instead.

npm WARN deprecated jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade



> utf-8-validate@1.2.2 install c:\Users\Jim H\Documents\GitHub\moodapp2\node_modules\protractor\node_modules\selenium-webdriver\node_modules\ws\node_modules\utf-8-validate

> node-gyp rebuild



c:\Users\Jim H\Documents\GitHub\moodapp2\node_modules\protractor\node_modules\selenium-webdriver\node_modules\ws\node_modules\utf-8-validate>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node  rebuild )

Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.

  validation.cc

     Creating library c:\Users\Jim H\Documents\GitHub\moodapp2\node_modules\protractor\node_modules\selenium-webdriver\node_modules\ws\node_modules\utf-8-validate\build\Release\validation.lib and object c:\Users\Jim H\Documents\GitHub\moodapp2\node_modules\protractor\node_modules\selenium-webdriver\node_modules\ws\

  node_modules\utf-8-validate\build\Release\validation.exp

  Generating code

  Finished generating code

  validation.vcxproj -> c:\Users\Jim H\Documents\GitHub\moodapp2\node_modules\protractor\node_modules\selenium-webdriver\node_modules\ws\node_modules\utf-8-validate\build\Release\\validation.node

/



> bufferutil@1.2.1 install c:\Users\Jim H\Documents\GitHub\moodapp2\node_modules\protractor\node_modules\selenium-webdriver\node_modules\ws\node_modules\bufferutil

> node-gyp rebuild



c:\Users\Jim H\Documents\GitHub\moodapp2\node_modules\protractor\node_modules\selenium-webdriver\node_modules\ws\node_modules\bufferutil>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node  rebuild )

Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.

  bufferutil.cc

     Creating library c:\Users\Jim H\Documents\GitHub\moodapp2\node_modules\protractor\node_modules\selenium-webdriver\node_modules\ws\node_modules\bufferutil\build\Release\bufferutil.lib and object c:\Users\Jim H\Documents\GitHub\moodapp2\node_modules\protractor\node_modules\selenium-webdriver\node_modules\ws\node

  _modules\bufferutil\build\Release\bufferutil.exp

  Generating code

  Finished generating code

  bufferutil.vcxproj -> c:\Users\Jim H\Documents\GitHub\moodapp2\node_modules\protractor\node_modules\selenium-webdriver\node_modules\ws\node_modules\bufferutil\build\Release\\bufferutil.node

-



> node-sass@2.1.1 install c:\Users\Jim H\Documents\GitHub\moodapp2\node_modules\gulp-sass\node_modules\node-sass

> node scripts/install.js


npm WARN engine clean-stack@1.1.1: wanted: {"node":">=4"} (current: {"node":"0.12.7","npm":"2.11.3"})

npm WARN engine indent-string@3.1.0: wanted: {"node":">=4"} (current: {"node":"0.12.7","npm":"2.11.3"})

npm WARN engine fkill@4.1.0: wanted: {"node":">=4"} (current: {"node":"0.12.7","npm":"2.11.3"})

npm WARN engine har-validator@4.2.1: wanted: {"node":">=4"} (current: {"node":"0.12.7","npm":"2.11.3"})

npm WARN engine har-schema@1.0.5: wanted: {"node":">=4"} (current: {"node":"0.12.7","npm":"2.11.3"})

npm WARN engine taskkill@2.0.0: wanted: {"node":">=4"} (current: {"node":"0.12.7","npm":"2.11.3"})

npm WARN engine aggregate-error@0.1.0: wanted: {"node":">=4"} (current: {"node":"0.12.7","npm":"2.11.3"})

npm WARN engine request@2.81.0: wanted: {"node":">= 4"} (current: {"node":"0.12.7","npm":"2.11.3"})

npm WARN engine pngjs@3.0.1: wanted: {"node":">=4.0.0"} (current: {"node":"0.12.7","npm":"2.11.3"})


> node-sass@2.1.1 postinstall c:\Users\Jim H\Documents\GitHub\moodapp2\node_modules\gulp-sass\node_modules\node-sass

> node scripts/build.js


`win32-x64-node-0.12` exists; testing

Binary is fine; exiting

npm WARN engine esprima@3.1.3: wanted: {"node":">=4"} (current: {"node":"0.12.7","npm":"2.11.3"})

npm WARN engine punycode@2.1.0: wanted: {"node":">=6"} (current: {"node":"0.12.7","npm":"2.11.3"})

npm WARN engine punycode@2.1.0: wanted: {"node":">=6"} (current: {"node":"0.12.7","npm":"2.11.3"})

npm WARN peerDependencies The peer dependency request@^2.34 included from request-promise will no

npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency

npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.

|



> appium-windows-driver@0.4.1 install c:\Users\Jim H\Documents\GitHub\moodapp2\node_modules\appium\node_modules\appium-windows-driver

> node install-npm.js


module.js:338

    throw err;

          ^

Error: Cannot find module 'core-js/library/fn/symbol'

    at Function.Module._resolveFilename (module.js:336:15)

    at Function.Module._load (module.js:278:25)

    at Module.require (module.js:365:17)

    at require (module.js:384:17)

    at Object.<anonymous> (c:\Users\Jim H\Documents\GitHub\moodapp2\node_modules\appium\node_modules\babel-runtime\core-js\symbol.js:1:93)

    at Module._compile (module.js:460:26)

    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)

|

> appium-selendroid-driver@1.6.0 install c:\Users\Jim H\Documents\GitHub\moodapp2\node_modules\appium\node_modules\appium-selendroid-driver

> node ./bin/install.js


TypeError: undefined is not a function

    at Object.<anonymous> (../../lib/adb.js:73:28)

    at Module._compile (module.js:460:26)

    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> (c:\Users\Jim H\Documents\GitHub\moodapp2\node_modules\appium\node_modules\appium-adb\build\index.js:11:15)

    at Module._compile (module.js:460:26)

    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> (../../lib/android-helpers.js:10:49)

    at Module._compile (module.js:460:26)

    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> (../../../lib/commands/general.js:1:23)

    at Module._compile (module.js:460:26)

    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)

\



> appium-chromedriver@2.11.0 install c:\Users\Jim H\Documents\GitHub\moodapp2\node_modules\appium\node_modules\appium-chromedriver

> node install-npm.js


info Chromedriver Install Installing Chromedriver version '2.28' for platform 'win' and architecture '32'

info Chromedriver Install Opening temp file to write chromedriver_win32 to...

info Chromedriver Install Downloading https://chromedriver.storage.googleapis.com/2.28/chromedriver_win32.zip...

info Chromedriver Install Writing binary content to C:\Users\JIMH~1\AppData\Local\Temp\2017410-1080-o1j8jy\chromedriver_win32.zip...

info Chromedriver Install Extracting C:\Users\JIMH~1\AppData\Local\Temp\2017410-1080-o1j8jy\chromedriver_win32.zip to C:\Users\JIMH~1\AppData\Local\Temp\2017410-1080-o1j8jy\chromedriver_win32

info Chromedriver Install Creating c:\Users\Jim H\Documents\GitHub\moodapp2\node_modules\appium\node_modules\appium-chromedriver\chromedriver\win...

info Chromedriver Install Copying unzipped binary, reading from C:\Users\JIMH~1\AppData\Local\Temp\2017410-1080-o1j8jy\chromedriver_win32\chromedriver.exe...

info Chromedriver Install Writing to c:\Users\Jim H\Documents\GitHub\moodapp2\node_modules\appium\node_modules\appium-chromedriver\chromedriver\win\chromedriver.exe...

info Chromedriver Install c:\Users\Jim H\Documents\GitHub\moodapp2\node_modules\appium\node_modules\appium-chromedriver\chromedriver\win\chromedriver.exe successfully put in place


> appium-uiautomator2-driver@0.3.1 install c:\Users\Jim H\Documents\GitHub\moodapp2\node_modules\appium\node_modules\appium-uiautomator2-driver

> node ./bin/install.js


TypeError: undefined is not a function

    at Object.<anonymous> (../../lib/adb.js:73:28)

    at Module._compile (module.js:460:26)

    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> (c:\Users\Jim H\Documents\GitHub\moodapp2\node_modules\appium\node_modules\appium-adb\build\index.js:11:15)

    at Module._compile (module.js:460:26)

    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> (../../lib/android-helpers.js:10:49)

    at Module._compile (module.js:460:26)

    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> (../../../lib/commands/general.js:1:23)

    at Module._compile (module.js:460:26)

    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)

npm ERR! Windows_NT 6.3.9600

npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"

npm ERR! node v0.12.7

npm ERR! npm  v2.11.3

npm ERR! path C:\Users\Jim H\AppData\Roaming\npm-cache\ansi-regex\2.1.1\package\package.json

npm ERR! code EPERM

npm ERR! errno -4048


npm ERR! Error: EPERM, rename 'C:\Users\Jim H\AppData\Roaming\npm-cache\ansi-regex\2.1.1\package\package.json'

npm ERR!     at Error (native)

npm ERR!  { [Error: EPERM, rename 'C:\Users\Jim H\AppData\Roaming\npm-cache\ansi-regex\2.1.1\package\package.json']

npm ERR!   errno: -4048,

npm ERR!   code: 'EPERM',

npm ERR!   path: 'C:\\Users\\Jim H\\AppData\\Roaming\\npm-cache\\ansi-regex\\2.1.1\\package\\package.json',

npm ERR!   parent: 'strip-ansi' }

npm ERR!

npm ERR! Please try running this command again as root/Administrator.


npm ERR! Please include the following file with any support request:

npm ERR!     c:\Users\Jim H\Documents\GitHub\moodapp2\npm-debug.log


c:\Users\Jim H\Documents\GitHub\moodapp2>


Can anyone point me in the direction where I'm going wrong?

Many thanks

Jim


Average of ratings: -
In reply to Jim H

Re: Mobile App Build and environment

by Jim H -

Hi again all smile

It may have been wiser for me just to post my environment set up rather than the long winded console output!

I'm using the following:

Node -  0.12.7

NPM - 2.11.3

Cordova - 6.5.0

Ionic - 2.2.3

Bower - 1.8.0

Gulp - Cli version 3.9.1

Can anyone confirm if this is correct....I'm assuming it isn't as it doesn't work!

Hopefully, this is a bit more to the point and easier to reply to than my original post!

Many thanks

Jim


In reply to Jim H

Re: Mobile App Build and environment

by Dani Palou -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Hello Jim,

it's the first time I see that error so I'm not sure if I'll be able to help you.

We're in the middle of a change in the requirements for the app. This issue is already merged in the integration branch, and it should be merged into the master branch soon.

Here is the environment I'm using (Mac OS X):

Node - 6.9.1

NPM - 4.3.0

Cordova - 6.5.0

Ionic - 2.2.1

Bower - 1.5.3

Gulp - Local version 3.9.1

I hope this helps you!

Dani

In reply to Dani Palou

Re: Mobile App Build and environment

by Jim H -

Hi Dani

Thank you for the reply...it's really appreciated smile

Since posting this I updated to Node 6.7.0 but still had issues running NPM install.

I've recently uninstalled node 6.7 and re-installed node 0.12.7 and NPM install now completes but I get an appium error.

I am able to run the other processes (ionic platform add android@5.1.1, ionic platform add ios@4.1.0, ionic state restore, bower install and gulp to build the project ) now though which is an improvement on where I was before

My set up is currently:

Node  0.12.7

NPM 4.6.1

bower 1.8.0

gulp 3.9.1

Ionic 2.2.3

cordova 6.5.0

I'm not sure if the appium error I am getting during npm install is significant or not as I can run the app in the browser

I think I'm close to getting it all working but not quite there!

Thank you again for your response....I think I need to mess around with node & npm versions a little more maybe or wait until the set up requirements are a little clearer

Jim



In reply to Jim H

Re: Mobile App Build and environment

by Dani Palou -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Hi Jim,

appium is only needed for automated testing, so it shouldn't be a problem for you. Please let us know if you find any other error.

Cheers,

Dani

In reply to Dani Palou

Re: Mobile App Build and environment

by Jim H -

Hi Dani

Thank you very much indeed!

In that case I think I'm all good with my current set up, which is fantastic news!

I'll do some more tinkering to be sure but hopefully I'll be able to build without a problem

Thank you once again for your replies

Have a great weekend

Jim