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

install-app-deps failure cause can't find module electron-updater #1375

Closed
ghost opened this issue Mar 15, 2017 · 15 comments
Closed

install-app-deps failure cause can't find module electron-updater #1375

ghost opened this issue Mar 15, 2017 · 15 comments

Comments

@ghost
Copy link

ghost commented Mar 15, 2017

  • Version: 15.2.0
  • Updater Version: 1.8.2
  • Target: NSIS
npm ERR! node v4.5.0
npm ERR! npm  v2.15.9

npm ERR! version not found: electron-updater@1.8.2
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR! /Users/{path}/electron/app/npm-debug.log

If install manually - works fine. What can be the reason of it?

@develar
Copy link
Member

develar commented Mar 15, 2017

Please update electron-updater to 1.10.1

@develar develar closed this as completed Mar 15, 2017
@ghost
Copy link
Author

ghost commented Mar 16, 2017

@develar, same result

@ghost
Copy link
Author

ghost commented Mar 17, 2017

Hey @develar any ideas why it can happen? Manual install works, when try to see latest available version using npm view electron-updater version - also see 1.10.1. But when clean all deps, and try to call npm i from root, in always fails on install-app-deps step.

@develar
Copy link
Member

develar commented Mar 17, 2017

@cumajkeee Could you please show your package.json? Have you tried yarn?

@ghost
Copy link
Author

ghost commented Mar 17, 2017

Yarn - no, which one dev or app?

@develar
Copy link
Member

develar commented Mar 17, 2017

which one dev or app?

dev

@ghost
Copy link
Author

ghost commented Mar 17, 2017

{
  
"name": “***”,

"version": “0.0.1”,
  
"description": “***”,
  
"private": true,
  
"scripts": {

    "postinstall": "install-app-deps",

    "start": "npm run prepare && electron ./app",

    "s": "electron ./app",

    "prepare": "grunt clean:electron && grunt electron:dev -f",

    "prepare:prod": "grunt clean:electron && grunt electron:prod -f",

    "build": "npm run prepare && build --x64",

    "build:prod": "npm run prepare:prod && build --x64"

  },

  "build": {

    "appId": “***”,

    "extraFiles": [
      "resources/**"
    ],

    "mac": {

      "category": “***”

    },

    "dmg": {

      "contents": [

        {

          "x": 330,

          "y": 220,

          "type": "link",

          "path": "/Applications"

        },

        {

          "x": 117,

          "y": 220

        }

      ]
 
   },

    "win": {

      "target": "nsis"

    },

    "nsis": {

      "deleteAppDataOnUninstall": true

    },

    "publish": {

      "provider": "generic",

      "url": ""

    }

  },

  "devDependencies": {

    "electron": "1.6.2",

    "electron-builder": "15.4.3"

  }

}


@ghost
Copy link
Author

ghost commented Mar 17, 2017

latest builder not used cause errors in it's dependencies is still there #1344

@ghost
Copy link
Author

ghost commented Mar 17, 2017

BTW @develar , have other question to you. If for example I use node-modules that are rebuild for native lang. I build application with on PC on Win10 with all needed env. And application I install on clear Windows 7. Is there possibility to have problems due older OS version will not understand modern code in rebuild modules and trigger errors?

@develar
Copy link
Member

develar commented Mar 17, 2017

Is there possibility to have problems due older OS version will not understand modern code in rebuild modules and trigger errors

In case of Windows — no. It is ok to build on win 10 for win 7. (it is possible to write such native node modules, but it is theoretical).

@ghost
Copy link
Author

ghost commented Mar 17, 2017

hm, I have sometimes a strange issue, that while application run there is error:

Error: ENOENT, node_modules\keytar\build\Release\keytar.node not found in
C:\Users\user\AppData\Local\Programs\app\resources\app.asar

But when unpack asar, I see that file is there.

does package.json look correct?

@develar
Copy link
Member

develar commented Mar 17, 2017

@cumajkeee keytar works for me, so, I doubt that it is electron-builder issue. BTW, please consider to migrate to one-package.json structure.

I don't know what's wrong. I suggest switch to one-package.json structure and use yarn instead of npm.

@ghost
Copy link
Author

ghost commented Mar 17, 2017

For me also, just several users has problems with that. So I want to understand the whole process for modules rebuild to identify core of a problem. Last question, node-gyp rebuild modules for specific electron version. Is it problem that locally I have node v4.5.0, and my target (electron 1.6.2) using node. v7.x.x?

@develar
Copy link
Member

develar commented Mar 17, 2017

node-gyp rebuild modules for specific electron version. Is it problem that locally I have node v4.5.0, and my target (electron 1.6.2) using node. v7.x.x?

In any case electron headers are specified explicitly, regardless of node version.

Is it problem that locally I have node v4.5.0

I suggest you to use at least latest LTS 6. Or better 7.

@ghost
Copy link
Author

ghost commented Mar 17, 2017

Thanks a lot.

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

1 participant