Skip to content

Incompatible with @microsoft/api-extractor (maybe pnpm?). #1513

@rogerleung0411

Description

@rogerleung0411

Describe the bug
image

In my project, i use @microsoft/api-extractor to rollup all d.ts into a single d.ts per package(like what vue 3.0 does).

However, when i migrate yarn to pnpm, and build my project once again, the error(snapshot above) occurs.
It it obvious that api-extractor (code here) tries to read meta info from esm/package.json (or cjs/package.json), while no name field found.

It is neccessary not only provide type field but merge with the root package.json in postcompile.sh?

To Reproduce

  • clone vue next repo
  • access an arbitrary package under /packages/, add socket.io-client to dependencies, then exports * from 'socket.io-client' in index.ts
  • build the package, error will log in terminal.

im not sure it is actually a bug of socket.io-client, or the build tools / package manager tools i used, or even it is not a bug and has walkaround?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions