Moodle mobile setup

Moodle mobile setup

by Pradeep Varma -
Number of replies: 8

Hi I am trying to setup development environment in ubuntu but when i run below command

npm run setup
i am getting error.

 Caught exception:
 undefined

Mind letting us know? https://github.com/driftyco/ionic-cli/issues

bower ESUDO         Cannot be run with sudo

Additional error details:
Since bower is a user command, there is no need to execute it with superuser permissions.
If you're having permission errors when using bower without sudo, please spend a few minutes learning more about how your system should work and make any necessary repairs.

http://www.joyent.com/blog/installing-node-and-npm
https://gist.github.com/isaacs/579814

You can however run a command with sudo using --allow-root option

npm ERR! Linux 4.10.0-35-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "setup" "--allow-root" "option"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! moodlemobile@3.3.2 setup: `npm install && ionic state restore && bower install && gulp "option"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the moodlemobile@3.3.2 setup script 'npm install && ionic state restore && bower install && gulp "option"'.
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 moodlemobile package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm install && ionic state restore && bower install && gulp "option"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs moodlemobile
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls moodlemobile
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/pradeep/moodlemobile/npm-debug.log


Please help me to resolve the issue ASAP

Average of ratings: -
In reply to Pradeep Varma

Re: Moodle mobile setup

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

Hi,

it seems that for some reason the bower command is being executed as root (sudo), but it shouldn't. You can try to run each command 1 by 1:

npm install

ionic state restore 

bower install

gulp

As I said, please make sure that the bower install command isn't run with sudo.

Kind regards,

Dani

In reply to Dani Palou

Re: Moodle mobile setup

by Pradeep Varma -

Thanks Dani its works,


One more query i just want to enable Telugu language in mobile how its possible.

In reply to Pradeep Varma

Re: Moodle mobile setup

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

Hi,

you need to add the new language to the "languages" list in config.json.

After that, you'll have to translate everything to that language (you'll see that most addons and components have a "lang" folder with one file per language).

If you're going to translate everything, I'd like to ask you to include those translations in lang.moodle.org. That's the tool we use to translate the Mobile app, so if you include them in there they can be applied to the official Mobile app smile

Kind regards,

Dani

In reply to Dani Palou

Re: Moodle mobile setup

by Pradeep Varma -

Hi Dani,


Thanks very much now i am able to change language also. i had few queries while creating

1. calender event i am only able to create events users/site,course level option is not showing up.

2. Notifications i registered my site with Moodle.org and got airnotifier access key also and configured in moodle but can i know what are all the notifications users will get.

can you give some example its could helpful for me to get through it.


In reply to Pradeep Varma

Re: Moodle mobile setup

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

Hi Pradeep,

for creating calendar events, I guess you are doing that in the browser, right? Since the app doesn't allow creating them.

To create a course event, you need to go into the course and, once inside, click "New event" in the upcoming events block. That's the way I do it, maybe there are others. Calendar will be improved in 3.4, and I think then you'll be able to create a Course event without having to enter in the course.

To see the list of all notifications, go to your Preferences > Notification preferences. You'll see the full list of notifications in there. You'll also receive notifications for messages received.

Kind regards,

Dani

In reply to Pradeep Varma

Re: Moodle mobile setup

by Pradeep Varma -

Hi Dani


i have added the language in config.file and json file as attached in www/core/lang folder is it correct or any mistakes are there because i am not able to see those changes in app.

In reply to Pradeep Varma

Re: Moodle mobile setup

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

Hi Pradeep,

IMO that should be enough, please make sure to run "gulp" so the changes are applied to the build files.

Unfortunately our core team do not have the resources here to help people use the open source code version to build custom apps. We provide a service where we can customise the app for anyone who needs it including the Push notifications (Airnotifier) service management. This service helps fund the improvement of the app in general: https://moodle.com/mobileapp/

I’d recommend you to check the documentation links that are available in the Forum main page or hopefully somebody else in this forum will be able to help you.

Kind regards,

Dani

In reply to Dani Palou

Re: Moodle mobile setup

by Pradeep Varma -

hi dani,


i am getting below issue

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.x (node_modules/appium/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! Linux 4.4.0-62-generic
npm ERR! argv "/root/.nvm/versions/node/v6.9.1/bin/node" "/root/.nvm/versions/node/v6.9.1/bin/npm" "install"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE

npm ERR! appium-chromedriver@3.0.1 install: `node install-npm.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the appium-chromedriver@3.0.1 install script 'node install-npm.js'.
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 appium-chromedriver package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node install-npm.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs appium-chromedriver
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls appium-chromedriver
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /var/www/moodlemobile2/npm-debug.log


could you please help in this