cdklabs/publib

Workspace package - publib-npm fails to detect dist/js/*.tgz and creates new empty tgz

sfriedlizuehlke opened this issue · 0 comments

Hello,

While working with a monorepo setup I noticed the following bug in the publib-npm publisher.

I currently have the following setup in a project:

root
- node_modules
- pacakge.json
- packages
  - module-A
    - dist/js/*.tgz
    - package.json

I've attached my project setup in the zip: project.zip

Problem

When running publib-npm from the directory packages/module-A it fails to detect the dist/js/*.tgz and creates a new package. If at that time the compiled files are not available this results in an empty package being published.

The setup with the monorepo can publish python packages with publib-pypi successfully.

Workaround

As a workaround I currently configured jsii to output the packages to the dist directory in the root with "outdir": "../../dist",. When I then call the publib-npm from the root directory, the package gets published successfully.