debugjs icon indicating copy to clipboard operation
debugjs copied to clipboard

No dist in package, can't import in node.js

Open themadcreator opened this issue 8 years ago • 3 comments

Tried to use this sweet library in node.js, but failed.

  1. There is no dist directory, so package.json's main property points to a file that doesn't exist.

  2. Even if I try to directly require lib/index.js, I can't because node.js doesn't support ES6 imports.

Also, I can't just run npm run build in the node_module because your toolchain are dev-dependencies.

themadcreator avatar Oct 12 '16 22:10 themadcreator

It IS possible to run in node if i clone this repo and run npm install, but I'd very much like to use it as a normal npm package

themadcreator avatar Oct 12 '16 22:10 themadcreator

Since you have the dist folder in .gitignore but not .npmignore you should be able to publish those artifacts to NPM without checking them into git just by running npm run build before npm publish. There is no code change except to update the version in package.json

themadcreator avatar Oct 20 '16 23:10 themadcreator

I'm running into this same issue, it would be amazing to use this library as a normal npm package!

calvinstudebaker avatar Dec 18 '20 15:12 calvinstudebaker