pimterry / loglevel

:ledger: Minimal lightweight logging for JavaScript, adding reliable log level methods to wrap any available console.log methods
MIT License
2.62k stars 157 forks source link

invalid main attribute in package.json #136

Closed mkvonarx closed 5 years ago

mkvonarx commented 5 years ago

The main attribute in package.json of loglevel 1.6.3 is not correct. It references a directory instead of a file.

Current value:

"main": "lib/loglevel",

Correct value:

"main": "lib/loglevel.js",

With the incorrect value, the loglevel library does not work with webpack (4.39.3). I always get the error Module not found: Error: Can't resolve 'loglevel' in '....' from webpack when trying to use loglevel.

pimterry commented 5 years ago

Excellent point, you're completely right. I've fixed this in https://github.com/pimterry/loglevel/commit/bb4f850fb54e58914d48739125791cbb61fc6d94, and its now released as v1.6.4.

Thanks for letting me know!