npm install error installing simctl module

npm install error installing simctl module

by Nicolas Ndalpe -
Number of replies: 3

Hi Guys,

I am trying to setup my env to compile the app with ionic.


I am running into the following error when running "npm run setup". See log below.


Seems to be an issue with installing the simctl module. I tried to run the command with sudo, still the same error. I tried to remove the node_module folder and start fresh without success.


This is my setup:

Ubuntu 18.10
npm --version : 6.7.0
node --version : v11.10.1
gulp --version : [08:26:12] CLI version 2.0.1
ionic --version : 4.10.3


This is the error:
> moodlemobile@3.6.1 setup /vagrant_data
> npm install && cordova prepare && gulp

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: rc@1.2.8 (node_modules/@ionic/app-scripts/node_modules/fsevents/node_modules/rc):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: ENOTEMPTY: directory not empty, rmdir '/vagrant_data/node_modules/@ionic/app-scripts/node_modules/fsevents/node_modules/.rc.DELETE/node_modules'

npm ERR! path /vagrant_data/node_modules/cordova-ios/node_modules/.simctl.DELETE/node_modules
npm ERR! code ENOTEMPTY
npm ERR! errno -39
npm ERR! syscall rmdir
npm ERR! ENOTEMPTY: directory not empty, rmdir '/vagrant_data/node_modules/cordova-ios/node_modules/.simctl.DELETE/node_modules'


npm ERR! A complete log of this run can be found in:
npm ERR!     /home/vagrant/.npm/_logs/2019-03-01T08_08_35_077Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 217
npm ERR! moodlemobile@3.6.1 setup: `npm install && cordova prepare && gulp`
npm ERR! Exit status 217
npm ERR!
npm ERR! Failed at the moodlemobile@3.6.1 setup 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!     /home/vagrant/.npm/_logs/2019-03-01T08_08_35_121Z-debug.log


Thank you in advance for your help



Average of ratings: -
In reply to Nicolas Ndalpe

Re: npm install error installing simctl module

by Nicolas Ndalpe -

I found my error.

The error came from the fact that I tried to install npm modules into a synched folder from the guest machine.


What I did:

1 - vagrant up

2 - clone your moodle mobile into a folder ignored by vagrant. I used "~/mm"

3 - install all your npm modules there. https://docs.moodle.org/dev/Setting_up_your_development_environment_for_Moodle_Mobile_2

4 - copy your node_modules folder from ~/mm/node_module to your vagrant dir


That worked for me


Hope it helps

In reply to Nicolas Ndalpe

Re: npm install error installing simctl module

by dr_ nyt -

Hey!

I seem to be getting a similar issue and I am new to all this so i don't quite understand what you mean by vagrant.

I am trying to run npm run setup from a ubuntu 18.04 LTS.

Here is the log:
```

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   '/home/dr_nyt/.nvm/versions/node/v12.7.0/bin/node',
1 verbose cli   '/home/dr_nyt/.nvm/versions/node/v12.7.0/bin/npm',
1 verbose cli   'run',
1 verbose cli   'setup'
1 verbose cli ]
2 info using npm@6.10.0
3 info using node@v12.7.0
4 verbose run-script [ 'presetup', 'setup', 'postsetup' ]
5 info lifecycle dataletixmobile@3.7.0~presetup: dataletixmobile@3.7.0
6 info lifecycle dataletixmobile@3.7.0~setup: dataletixmobile@3.7.0
7 verbose lifecycle dataletixmobile@3.7.0~setup: unsafe-perm in lifecycle true
8 verbose lifecycle dataletixmobile@3.7.0~setup: PATH: /home/dr_nyt/.nvm/versions/node/v12.7.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/v12.7.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle dataletixmobile@3.7.0~setup: CWD: /home/dr_nyt/moodlemobiledirectory
10 silly lifecycle dataletixmobile@3.7.0~setup: Args: [ '-c', 'npm install && npx cordova prepare && npx gulp' ]
11 silly lifecycle dataletixmobile@3.7.0~setup: Returned: code: 1  signal: null
12 info lifecycle dataletixmobile@3.7.0~setup: Failed to exec setup script
13 verbose stack Error: dataletixmobile@3.7.0 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/v12.7.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack     at EventEmitter.emit (events.js:203:13)
13 verbose stack     at ChildProcess.<anonymous> (/home/dr_nyt/.nvm/versions/node/v12.7.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:203:13)
13 verbose stack     at maybeClose (internal/child_process.js:1021:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
14 verbose pkgid dataletixmobile@3.7.0
15 verbose cwd /home/dr_nyt/moodlemobiledirectory
16 verbose Linux 5.0.0-23-generic
17 verbose argv "/home/dr_nyt/.nvm/versions/node/v12.7.0/bin/node" "/home/dr_nyt/.nvm/versions/node/v12.7.0/bin/npm" "run" "setup"
18 verbose node v12.7.0
19 verbose npm  v6.10.0
20 error code ELIFECYCLE
21 error errno 1
22 error dataletixmobile@3.7.0 setup: `npm install && npx cordova prepare && npx gulp`
22 error Exit status 1
23 error Failed at the dataletixmobile@3.7.0 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! :D



In reply to Nicolas Ndalpe

Re: npm install error installing simctl module

by Sahaja Yoga Everyday -

Hi, is there any video tutorial with details on the required changes and fixes to issue like npm not recognized etc.

Thanks