Kiikurage/babel-plugin-flow-to-typescript

dist folder not included in NPM package

META-DREAMER opened this issue · 7 comments

Followed the instructions exactly in the Readme, got this error:

image

Checked in the node_modules/babel-plugin-flow-to-typescript folder and there's nothing but this:
image

Hitting the same issue. Is there a workaround?

@HammadJ @antonycourtney Hmm. Currently we have no workaround about it. I'll investigate more in this weekend.

@Kiikurage Thanks for looking into it. For what it's worth I managed to work around by cloning the repository, building locally, and then copying the dist dir from local build into the node_modules/babel-plugin-flow-to-typescript directory in the project I wanted to convert. I imagine doing an npm install from my local build (instead of from npm) would also have worked.
Overall just looks like a bad publish on npm that inadvertently omitted the build dir.

@Kiikurage You’ve added dist to your .gitignore, which seems appropriate. But you have no .npmignore…and with no .npmignore, npm defaults to using .gitignore.

Creating an appropriate .npmignore should fix it.

Another solution is to put a files whitelist in the package.json file. This is generally more maintainable than the .npmignore blacklist. Let me get a PR ready. Edit: #27

plop any news on this ?