For reference, the repo is https://github.com/microsoftly/luis-response-builder.
The node module files are generated with tsc and output to the dist folder. I have a prepublishOnly step that removes the dist folder, runs tsc, then runs the test against the transpiled js. The tests pass when I publish just fine.
The problem is, when I install the project anywhere else, the dist folder contains only the file with the path dist/src/index.js.
I cannot for the life of me figure out why the file is missing when installed but not when published.
Quoting from npm-publish Documentation:
All files in the package directory are included if no local
.gitignore
or.npmignore
file exists. If both files exist and a file is ignored by.gitignore
but not by.npmignore
then it will be included.
Your repository's .gitignore
file contains the following:
node_modules
dist
*.env
yarn-error.log
Since dist
is being ignored, it's not committed with npm publish
, as per the documentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With