Hello,
I'm fairly new to moodle and was trying to build an app from this repo: https://github.com/moodlehq/moodlemobile2
I get an error when running "npm run setup".
I used the following as a build guide: https://docs.moodle.org/dev/Setting_up_your_development_environment_for_Moodle_Mobile_2
I am using Ubuntu 18.04 and issued the following commands:
nvm install 11.12.0 nvm use 11.12.0
npm cache clean --force
npm install -g cordova@8.1.2 ionic
npm install -g gulp
git clone https://github.com/moodlehq/moodlemobile2.git moodlemobiledirectory
cd moodlemobiledirectory
git checkout integration
npm run setup
- After which i get the following error:
0 info it worked if it ends with ok
1 verbose cli [ '/home/dr_nyt/.nvm/versions/node/v11.12.0/bin/node',
1 verbose cli '/home/dr_nyt/.nvm/versions/node/v11.12.0/bin/npm',
1 verbose cli 'run',
1 verbose cli 'setup' ]
2 info using npm@6.7.0
3 info using node@v11.12.0
4 verbose run-script [ 'presetup', 'setup', 'postsetup' ]
5 info lifecycle moodlemobile@3.7.1~presetup: moodlemobile@3.7.1
6 info lifecycle moodlemobile@3.7.1~setup: moodlemobile@3.7.1
7 verbose lifecycle moodlemobile@3.7.1~setup: unsafe-perm in lifecycle true
8 verbose lifecycle moodlemobile@3.7.1~setup: PATH: /home/dr_nyt/.nvm/versions/node/v11.12.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/dr_nyt/moodlemobiledirectory/node_modules/.bin:/home/dr_nyt/.nvm/versions/node/v11.12.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle moodlemobile@3.7.1~setup: CWD: /home/dr_nyt/moodlemobiledirectory
10 silly lifecycle moodlemobile@3.7.1~setup: Args: [ '-c', 'npm install && npx cordova prepare && npx gulp' ]
11 silly lifecycle moodlemobile@3.7.1~setup: Returned: code: 1 signal: null
12 info lifecycle moodlemobile@3.7.1~setup: Failed to exec setup script
13 verbose stack Error: moodlemobile@3.7.1 setup: `npm install && npx cordova prepare && npx gulp`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/home/dr_nyt/.nvm/versions/node/v11.12.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:197:13)
13 verbose stack at ChildProcess.<anonymous> (/home/dr_nyt/.nvm/versions/node/v11.12.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:197:13)
13 verbose stack at maybeClose (internal/child_process.js:988:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
14 verbose pkgid moodlemobile@3.7.1
15 verbose cwd /home/dr_nyt/moodlemobiledirectory
16 verbose Linux 5.0.0-23-generic
17 verbose argv "/home/dr_nyt/.nvm/versions/node/v11.12.0/bin/node" "/home/dr_nyt/.nvm/versions/node/v11.12.0/bin/npm" "run" "setup"
18 verbose node v11.12.0
19 verbose npm v6.7.0
20 error code ELIFECYCLE
21 error errno 1
22 error moodlemobile@3.7.1 setup: `npm install && npx cordova prepare && npx gulp`
22 error Exit status 1
23 error Failed at the moodlemobile@3.7.1 setup script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
Any help would be greatly appreciated!