Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'npm install' don't run fine on ubuntu #11

Closed
AlexVFornazieri opened this issue Jul 7, 2017 · 5 comments
Closed

'npm install' don't run fine on ubuntu #11

AlexVFornazieri opened this issue Jul 7, 2017 · 5 comments

Comments

@AlexVFornazieri
Copy link

AlexVFornazieri commented Jul 7, 2017

Hello guys,

First of all, congratulations, I was in need of a project with this proposal, but I'm not getting started, I hope you can help me.

When running for first time 'npm install' on Ubuntu, the following error is being handled by installing the dependencies:
npm ERR! code EAI_AGAIN
npm ERR! errno EAI_AGAIN
npm ERR! request to https://registry.npmjs.org/tslint/-/tslint-5.4.2.tgz failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org:443

On a second attempt:
$ npm install
npm WARN deprecated [email protected]: Replaced by core tslint formatter
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: 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.

[email protected] install /home/abelha/Abelha.network/Polyonic/node_modules/fcopy-pre-bundled
echo ''

[email protected] postinstall /home/abelha/Abelha.network/Polyonic/node_modules/electron
node install.js

[email protected] postinstall /home/abelha/Abelha.network/Polyonic
electron-builder install-app-deps

electron-builder 19.13.0
Error: Application directory build doesn't exists
at /home/abelha/Abelha.network/Polyonic/node_modules/electron-builder/src/util/config.ts:279:13
From previous event:
at computeDefaultAppDirectory (/home/abelha/Abelha.network/Polyonic/node_modules/electron-builder/out/util/config.js:236:22)
at /home/abelha/Abelha.network/Polyonic/node_modules/electron-builder/src/cli/install-app-deps.ts:45:78
at next (native)
at runCallback (timers.js:672:20)
at tryOnImmediate (timers.js:645:5)
at processImmediate [as _immediateCallback] (timers.js:617:5)
From previous event:
at installAppDeps (/home/abelha/Abelha.network/Polyonic/node_modules/electron-builder/out/cli/install-app-deps.js:43:21)
at Object.args [as handler] (/home/abelha/Abelha.network/Polyonic/node_modules/electron-builder/src/cli/cli.ts:41:4)
at Object.self.runCommand (/home/abelha/Abelha.network/Polyonic/node_modules/electron-builder/node_modules/yargs/lib/command.js:233:22)
at Object.Yargs.self._parseArgs (/home/abelha/Abelha.network/Polyonic/node_modules/electron-builder/node_modules/yargs/yargs.js:990:30)
at Object.get [as argv] (/home/abelha/Abelha.network/Polyonic/node_modules/electron-builder/node_modules/yargs/yargs.js:927:19)
at Object. (/home/abelha/Abelha.network/Polyonic/node_modules/electron-builder/src/cli/cli.ts:36:15)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:389:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:504:3
npm ERR! code ELIFECYCLE
npm ERR! errno 255
npm ERR! [email protected] postinstall: electron-builder install-app-deps
npm ERR! Exit status 255
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Environmental Data
OS: Ubuntu 16.04
node -v 6.11.0
npm --version 5.1.0

@paulsutherland
Copy link
Owner

Hi,

It seems to be missing the build directory:

Error: Application directory build doesn't exists

I have added a .gitkeep to ensure the build directory is in a fresh repo.

Try pulling and building again.

Cheers..

Paul

@jean-merelis
Copy link

I had the same problem, but now the "npm install" runs endlessly until the system hangs. The system monitor displays a lot of npm instances running.

@paulsutherland
Copy link
Owner

Ok, I'll setup a fresh Ubuntu VM at the weekend and test this out.

It does look like an NPM issue, so can you help me out by letting me know what versions of following you are running:

Ubuntu
Node
NPM

Thanks,

Paul

@paulsutherland
Copy link
Owner

Hello @AlexVFornazieri @jean-merelis,

I managed to recreate the issues you were having. It was a problem with electron-builder. Removing the post install script resolved this. There were also a couple of file references that were incorrect in the gulp build scripts.

Anyway, I have update the repo, so please pull down the latest copy and try again.

FYI, on Ubuntu I had an ENOSPC issue - similar to #8. To work around this, you will need to increase the number of file watchers to allow gulp to work.

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

I have updated the README to reference this ENOSPC issue.

Also, you need to ensure you have build-essential installed as per: Installing Node.js via package manager

sudo apt-get install -y build-essential

Let me know if this resolves your build troubles so that I can close this issue.

FYI I tested this on:

Ubuntu 16:04 LTS
Node 6.11.1 LTS
NPM 3.10.10

Many thanks for the feedback 😄

@jean-merelis
Copy link

Hello @paulsutherland
Thanks a lot for the help. After increasing the number of file watchers, it works fine now.

My environment:
Ubuntu 16.04
Node v6.11.1
NPM 3..10.10

Thank you again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants