kessler / license-report

create a short report about a project's dependencies (license, url etc)
MIT License
227 stars 39 forks source link

Getting error when using license-report #12

Closed HunterJS-bit closed 5 years ago

HunterJS-bit commented 6 years ago

Hi Im using your plugin to generate licences in my project but when I run command "license-report --only=prod --output=json" Im getting following errors:

Error: invalid statusCode 404
    at Request._callback (/work/Projects/ELS/node_modules/license-report/lib/getPackageJson.js:43:29)
    at Request.self.callback (/work/Projects/ELS/node_modules/license-report/node_modules/request/request.js:185:22)
    at emitTwo (events.js:126:13)
    at Request.emit (events.js:214:7)
    at Request.<anonymous> (/work/Projects/ELS/node_modules/license-report/node_modules/request/request.js:1157:10)
    at emitOne (events.js:116:13)
    at Request.emit (events.js:211:7)
    at IncomingMessage.<anonymous> (/work/Projects/ELS/node_modules/license-report/node_modules/request/request.js:1079:12)
    at Object.onceWrapper (events.js:313:30)
    at emitNone (events.js:111:20)
HunterJS-bit commented 6 years ago

Figured it out it is because in my package.json I have private package, Also I have to ask why is "exclude" not working ??

julienben commented 6 years ago

Thanks for this package! Saved me lots of time today!

Just got the same error though. No relation to repo privacy. It was happening because some of my dependencies aren't published to npm (i.e. cross-deps in a lerna monorepo). I believe you might want to skip dependencies if they can't be found on npm instead of failing the whole script.

Also, the code doesn't know how to handle certain package names such as @google-cloud/storage or @google-cloud/pubsub.

luisdavim commented 6 years ago

is there any way to make this work with private registries?

kessler commented 5 years ago

@markomiljkovic exclude feature now works, can I close this issue? @luisdavim nothing is implemented, you are welcome to submit a PR

kessler commented 5 years ago

@luisdavim this should be resolved now