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

--unknown option reports an error #18

Open
dbengsch opened this issue Apr 21, 2016 · 0 comments
Open

--unknown option reports an error #18

dbengsch opened this issue Apr 21, 2016 · 0 comments

Comments

@dbengsch
Copy link

When I use the --unknown option on my project, the following error is triggered :

npm-license --unknown

/usr/local/lib/node_modules/npm-license/lib/index.js:124
            if (options.unknown && data[item].licenses !== UNKNOWN && data[item].licenses.indexOf('*') === -1)
                                                                                         ^

TypeError: Cannot read property 'indexOf' of undefined
    at /usr/local/lib/node_modules/npm-license/lib/index.js:124:90
    at Array.forEach (native)
    at /usr/local/lib/node_modules/npm-license/lib/index.js:123:34
    at /usr/local/lib/node_modules/npm-license/node_modules/read-installed/read-installed.js:142:5
    at /usr/local/lib/node_modules/npm-license/node_modules/read-installed/read-installed.js:263:14
    at cb (/usr/local/lib/node_modules/npm-license/node_modules/slide/lib/async-map.js:47:24)
    at /usr/local/lib/node_modules/npm-license/node_modules/read-installed/read-installed.js:263:14
    at cb (/usr/local/lib/node_modules/npm-license/node_modules/slide/lib/async-map.js:47:24)
    at /usr/local/lib/node_modules/npm-license/node_modules/read-installed/read-installed.js:263:14
    at cb (/usr/local/lib/node_modules/npm-license/node_modules/slide/lib/async-map.js:47:24)

When I use npm-license | grep -i unknown , I don't have any output, so I would guess it only occurs when there is no unknown license.

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