insin / package-config-checker

Checks if your dependencies have package.json files config or an .npmignore for packaging
MIT License
47 stars 3 forks source link

Doesn't handle `npm link`'d dependencies #2

Open sindresorhus opened 8 years ago

sindresorhus commented 8 years ago

If I have a dependency npm link'd into my node_modules folder, this tool throws. It should ignore those dependencies.

/usr/local/lib/node_modules/package-config-checker/bin/package-config-checker.js:10
var fileExists = require('file-exists')
      ^

TypeError: Path must be a string. Received undefined
    at assertPath (path.js:8:11)
    at Object.posix.join (path.js:479:5)
    at check (/usr/local/lib/node_modules/package-config-checker/bin/package-config-checker.js:65:28)
    at /usr/local/lib/node_modules/package-config-checker/bin/package-config-checker.js:75:5
    at Array.forEach (native)
    at check (/usr/local/lib/node_modules/package-config-checker/bin/package-config-checker.js:74:34)
    at /usr/local/lib/node_modules/package-config-checker/bin/package-config-checker.js:75:5
    at Array.forEach (native)
    at check (/usr/local/lib/node_modules/package-config-checker/bin/package-config-checker.js:74:34)
    at /usr/local/lib/node_modules/package-config-checker/bin/package-config-checker.js:75:5
insin commented 8 years ago

I think using realPath instead of path from read-installed's results should fix this.

insin commented 8 years ago

FFS GitHub I said try to fix as I couldn't duplicate this locally with a simple link to a neighboring repo.

Does 1.0.1 fix this?