mwittig / npm-license-crawler

Analyzes license information for multiple node.js modules (package.json files) as part of your software project.
BSD 3-Clause "New" or "Revised" License
233 stars 45 forks source link

npm license crawler does not display all my dependencies for my package.json #35

Open chandrasrt opened 5 years ago

chandrasrt commented 5 years ago

I am a first time user with this tool...

My package.json ( modified for licensing issues)

{
  "name": "myproject",
  "version": "1.1.0",
  "description": "An Oracle JavaScript Extension Toolkit(JET) web app for myproject",
  "dependencies": {
    "@oracle/oraclejet": "^7.0.0",
    "@oracle/oraclejet-tooling": "^7.0.0",
    "ajv": "^6.10.0",
    "ajv-keywords": "^3.4.0",
    "chrome-headless": "^0.1.5",
    "es6-promise": "^4.2.6",
    "grunt-karma": "^3.0.2",
    "jasmine-jquery": "^2.1.1",
    "karma-cli": "^2.0.0",
    "karma-sonarqube-unit-reporter": "0.0.18",
    "nyc": "^14.1.1",
    "phantomjs-prebuilt": "^2.1.16",
    "puppeteer": "^1.8.0",
    "qunit": "^2.9.2",
    "qunit-reporter-junit": "^1.1.1"
  },
  "devDependencies": {
    "@oracle/grunt-oraclejet": "^6.2.0",
    "babel-core": "^6.26.3",
    "babel-preset-env": "^1.7.0",
    "eslint": "^5.16.0",
    "eslint-config-airbnb": "^17.1.0",
    "eslint-plugin-import": "^2.17.2",
    "eslint-plugin-jsx-a11y": "^6.2.1",
    "eslint-plugin-react": "^7.13.0",
    "grunt": "^1.0.4",
    "grunt-babel": "^7.0.0",
    "grunt-eslint": "^20.2.0",
    "grunt-node-sass": "^1.0.1",
    "grunt-sass": "^2.1.0",
    "jasmine-core": "^3.4.0",
    "karma": "^4.1.0",
    "karma-chrome-launcher": "^2.2.0",
    "karma-coverage": "^1.1.2",
    "karma-es6-shim": "^1.0.0",
    "karma-jasmine": "^2.0.1",
    "karma-jasmine-ajax": "~0.1.13",
    "karma-jasmine-html-reporter": "~1.4.2",
    "karma-js-coverage": "~0.4.0",
    "karma-junit-reporter": "^1.2.0",
    "karma-requirejs": "^1.1.0",
    "karma-spec-reporter": "0.0.32",
    "load-grunt-config": "^1.0.2",
    "node-sass": "^4.7.2",
    "underscore": "^1.9.1"
  },
  "scripts": {
    "test": "./node_modules/karma/bin/karma start"
  },
  "engines": {
    "node": ">=0.10.0"
  },
  "private": true
}

======Issue======

[vagrant@localhost myproject]$ npm-license-crawler --onlyDirectDependencies dependencies
include dir /home/vagrant/git/myproject
scanning /home/vagrant/git/myproject
├─ @oracle/oraclejet-tooling@7.0.0
│  ├─ licenses: UPL-1.0
│  └─ parents: myproject
└─ @oracle/oraclejet@7.0.0
   ├─ licenses: UPL-1.0
   └─ parents: myproject

Number of entries found: 2
[vagrant@localhost myproject]$

My question: Why are the following omitted even when they are included as dependencies? Am i missing an option etc? Or is my package.json incorrect?

    "ajv": "^6.10.0",
    "ajv-keywords": "^3.4.0",
    "chrome-headless": "^0.1.5",
    "es6-promise": "^4.2.6",
    "grunt-karma": "^3.0.2",
    "jasmine-jquery": "^2.1.1",
    "karma-cli": "^2.0.0",
    "karma-sonarqube-unit-reporter": "0.0.18",
    "nyc": "^14.1.1",
    "phantomjs-prebuilt": "^2.1.16",
    "puppeteer": "^1.8.0",
    "qunit": "^2.9.2",
    "qunit-reporter-junit": "^1.1.1"

I just want to report 3rd party dependencies for my project.

chandrasrt commented 5 years ago

NPM and Node versions....

[vagrant@localhost ~]$ npm -v 6.9.0 [vagrant@localhost ~]$ node -v v6.17.1

mwittig commented 5 years ago

My question: Why are the following omitted even when they are included as dependencies? Am i missing an option etc? Or is my package.json incorrect?

Did you manage to install all project dependencies? I tried to reproduce your case and npm bailed out while trying to install phantomjs-prebuilt.