I am on a mission to create and release a package containing commonly used TypeScript functions on Verdaccio, an npm registry that operates on Docker.
After completing the build for my TypeScript package, this is how my project structure looks:
https://i.sstatic.net/3c7Ur.png
The important elements from my package.json file are:
{
"name": "communications",
"version": "1.0.0",
"description": "provides functional way of interacting with NATS",
// More details...
"dependencies": {
"nats": "^2.9.2"
}
}
Regarding my tsconfig.json settings:
{
"compilerOptions": {
/* Various compiler options mentioned... */
},
"include": ["src"],
"exclude": ["node_modules", "**/__tests__/*"]
}
In the .npmignore file, I specify:
package-lock.json
node_modules/
This is what my lib structure looks like post the tsc execution:
https://i.sstatic.net/n2Wnq.png
Despite successfully publishing the project in Verdaccio, when attempting to install it using:
npm install communications --registry http://localhost:4873/
I encounter issues where only the package.json file gets downloaded without any other contents. This leads to compilation errors due to missing import files.
I wonder why the lib folder is omitted completely from the npm package - any insights?
That's all for now.