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

get-package-info can't find right package.json #513

Closed
eljefedelrodeodeljefe opened this issue Oct 22, 2016 · 1 comment
Closed

get-package-info can't find right package.json #513

eljefedelrodeodeljefe opened this issue Oct 22, 2016 · 1 comment
Labels

Comments

@eljefedelrodeodeljefe
Copy link

Please describe your issue:

node 6 and 4:
The current version of get-package-info will try to get the package.json of the root directory. Since it is impossible to pass it the path to the package.json directly I am currently unable to actually build.

This is a bug upstream, however using this ancient version of it and maybe even using it at all should be reconsidered.

What command line arguments are you passing? Alternatively, if you are using the API, what
parameters are you passing to the packager() function?

Roberts-MacBook-Pro-2:dc-admin-ui jefe$ DEBUG=electron-packager ./node_modules/.bin/electron-packager ./src --all --deref-symlinks=false
  electron-packager Electron Packager 8.1.0 +0ms
  electron-packager Node v6.9.1 +3ms
  electron-packager Host Operating system: darwin (x64) +2ms
  electron-packager Packager Options: {"_":["./src"],"all":true,"deref-symlinks":false,"download":{"strictSSL":true},"overwrite":false,"prune":true,"dir":"./src","protocols":[]} +0ms
  electron-packager Target Platforms: darwin, linux, mas, win32 +3ms
  electron-packager Target Architectures: ia32, x64, armv7l +0ms
/Users/jefe/repos/dc-admin-ui/src
{ Error: Cannot find module 'package.json' from '/Users/jefe/repos'
    at /Users/jefe/repos/dc-admin-ui/node_modules/resolve/lib/async.js:46:17
    at process (/Users/jefe/repos/dc-admin-ui/node_modules/resolve/lib/async.js:173:43)
    at ondir (/Users/jefe/repos/dc-admin-ui/node_modules/resolve/lib/async.js:188:17)
    at load (/Users/jefe/repos/dc-admin-ui/node_modules/resolve/lib/async.js:69:43)
    at onex (/Users/jefe/repos/dc-admin-ui/node_modules/resolve/lib/async.js:92:31)
    at /Users/jefe/repos/dc-admin-ui/node_modules/resolve/lib/async.js:22:47
    at FSReqWrap.oncomplete (fs.js:123:15)
  cause: 
   Error: Cannot find module 'package.json' from '/Users/jefe/repos'
       at /Users/jefe/repos/dc-admin-ui/node_modules/resolve/lib/async.js:46:17
       at process (/Users/jefe/repos/dc-admin-ui/node_modules/resolve/lib/async.js:173:43)
       at ondir (/Users/jefe/repos/dc-admin-ui/node_modules/resolve/lib/async.js:188:17)
       at load (/Users/jefe/repos/dc-admin-ui/node_modules/resolve/lib/async.js:69:43)
       at onex (/Users/jefe/repos/dc-admin-ui/node_modules/resolve/lib/async.js:92:31)
       at /Users/jefe/repos/dc-admin-ui/node_modules/resolve/lib/async.js:22:47
       at FSReqWrap.oncomplete (fs.js:123:15),
  isOperational: true }
/Users/jefe/repos/dc-admin-ui/src
/Users/jefe/repos/dc-admin-ui

Please provide either a failing minimal testcase (with a link to the code) or detailed steps to
reproduce your problem. Using electron-quick-start
is a good starting point.

@eljefedelrodeodeljefe
Copy link
Author

To be more precise, it does this at least when the package.json is not configured right, e.g. wrong or missing version field

malept pushed a commit that referenced this issue Oct 29, 2016
This includes more helpful errors when failing to find all info requested, which lets us give better error messages, as well as ignore missing props for optional options.

Fixes #461, #513.
@malept malept closed this as completed Oct 29, 2016
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