Closed jpblancoder closed 5 years ago
Oh my… Sometimes, you mess things up. I totally did 🤦♂️
So, in short: I didn't notice the release was broken because I did npm link
on my local repo, so everything looked fine—I had a dist/
folder since I created a build.
The problem was that I didn't put the source files in the released package. Thus, it couldn't build the dist/
files when installed. So it was basically unusable (except if you did clone the repo and npm link
).
I fixed the release (using npm pack
to check the produced package first). I published that under a patch version, so v2.2.1.
And it seems to work now:
Thanks for spotting & telling me. I could have kept releasing broken packages without even noticing.
Ok, I closed this too fast. Release is ok but it seems not to be usable as it couldn't find ../package.json
.
This is weird since tsc
is supposed to include it as part of compilation. It works with local build, but I checked the release build (after you install the package) and it's not present in the dist/
folder.
Working on it. Looks like I will publish a v2.2.2.
Found the last issue. Turns out package.json
should explicitly be listed in files
to be included in the dist/
folder. This was subtle because the file is automatically part of the installed package with npm.
I got it installed & working:
v2.2.2 has been published and you should be able to make the lib work with this.
I get the following error message when installing via npm.
I believe this is due to no
dist
folder existing yet. But inpackage.json
you have the following JS files thatnpm
is trying to alias.