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

System hangs on "install-app-deps" #629

Closed
makeitcount opened this issue Aug 2, 2016 · 6 comments
Closed

System hangs on "install-app-deps" #629

makeitcount opened this issue Aug 2, 2016 · 6 comments
Labels

Comments

@makeitcount
Copy link

makeitcount commented Aug 2, 2016

  • Version: 5.20.0
  • Target: ubuntu, windows, mac

package.json
{
"name": "testingelectron",
"productName": "testingelectronbuild",
"version": "0.0.1",
"repository": "user/repo",
"author": {
"name": "Pradeep Sharma"
},
"scripts": {
"test": "xo",
"start": "electron .",
"postinstall": "install-app-deps",
"pack": "build --dir",
"dist": "build",
"build_with_epackager": "electron-packager . --out=dist --app-version=$npm_package_version --icon=./assets/img/icon --prune --asar --overwrite --all"
},
"files": [
"index.js",
"index.html",
"index.css"
],
"keywords": [
"electron-app",
"electron"
],
"dependencies": {
"electron-debug": "^1.0.0"
},
"devDependencies": {
"devtron": "^1.1.0",
"electron-packager": "^7.0.0",
"electron-prebuilt": "^1.0.1",
"electron-builder": "latest",
"xo": "^0.15.0"
},
"xo": {
"esnext": true,
"envs": [
"node",
"browser"
]
}

I run npm install on my system which ubuntu 14.04 os, has Node v4.4.7. And then system hangs. There is nothing in npm-debug.log.

@develar
Copy link
Member

develar commented Aug 2, 2016

Please see #376 (comment) Is it your case?

@makeitcount
Copy link
Author

Ok. How do we set up 'two package.json structure'. And how does it work (we need make different node_modules for development/production?)?

@develar
Copy link
Member

develar commented Aug 2, 2016

You only need to use two package.json structure if you have native modules. Otherwise you don't need to use it. You can use build.files to specify app files.

@makeitcount
Copy link
Author

makeitcount commented Aug 2, 2016

will need to integrate native modules. So I would create two package.json. and will keep
"postinstall": "install-app-deps". One package.json at the root and another one inside app folder.
I suppose I would need to modify postintall as well to install the second package dependency as well like this "postinstall": "install-app-deps && cd app && npm install"

@develar
Copy link
Member

develar commented Aug 2, 2016

I suppose I would need to modify postintall as well to install the second package dependency as well like this "postinstall": "install-app-deps && cd app && npm install"

No. install-app-deps automatically detects app directory and install app dependencies. You should use postinstall script exactly as in docs.

@makeitcount
Copy link
Author

Creating two package.json worked. Thanks @develar.

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

No branches or pull requests

2 participants