unplugin icon indicating copy to clipboard operation
unplugin copied to clipboard

Error occurred in dts build in monorepo

Open slavafyi opened this issue 2 years ago • 5 comments

Environment

node 18.15.0 unplugin 1.6.0 pnpm 8.14.0

Reproduction

https://github.com/slavamak/unplugin-monorepo-issue

Describe the bug

  1. git clone https://github.com/slavamak/unplugin-monorepo-issue.git
  2. pnpm i
  3. pnpm build

Additional context

Upgrading the vite package to version 5 in unplugin solves this problem.

Logs

src/vite.ts(4,1): error TS2742: The inferred type of 'default' cannot be named without a reference to '.pnpm/[email protected]_@[email protected]/node_modules/vite'. This is likely not portable. A type annotation is necessary.
src/vite.ts(4,1): error TS2742: The inferred type of 'default' cannot be named without a reference to '.pnpm/[email protected]_@[email protected]/node_modules/vite'. This is likely not portable. A type annotation is necessary.
src/webpack.ts(4,1): error TS2742: The inferred type of 'default' cannot be named without a reference to '.pnpm/[email protected][email protected]/node_modules/webpack'. This is likely not portable. A type annotation is necessary.

slavafyi avatar Dec 06 '23 17:12 slavafyi

I see that this #351 is closed. Is there any reason why it can't be merged?

slavafyi avatar Dec 08 '23 09:12 slavafyi

I bump unplugin and vite to latest version, but this doesn't fix this issue. Doesn't anyone else face this issue?

slavafyi avatar Dec 29 '23 11:12 slavafyi

me too

sLin90 avatar Jan 10 '24 09:01 sLin90

Maybe it is not a problem of unplugin and it is a problem of tsup but I have not seen any issues about it. At least understand what the problem is unfortunately I'm not very good at it to figure it out.

slavafyi avatar Jan 10 '24 09:01 slavafyi

I'm trying to learn how the library is build. https://github.com/vue-macros/vue-macros

sLin90 avatar Jan 10 '24 09:01 sLin90

I have updated the package versions and also use pnpm v9 and it works. I don't know what was the cause

slavafyi avatar May 03 '24 20:05 slavafyi