error TS2307: Cannot find module 'rollup' or its corresponding type declarations.
StreetStrider opened this issue · comments
I'm using this plugin and TS.
This line is problematic:
rollup-plugin-analyzer/index.d.ts
Line 1 in 0cbf5d0
../node_modules/.pnpm/rollup-plugin-analyzer@4.0.0/node_modules/rollup-plugin-analyzer/index.d.ts:1:24 - error TS2307: Cannot find module 'rollup' or its corresponding type declarations.
1 import { Plugin } from "rollup";
The problem might be invisible to devs since rollup is in dev deps.
I think Rollup must be declared as optional peer. It is in accordance with how other plugins declare it: https://github.com/rollup/plugins/blob/5ec2abe0325ed6b23bca26a5455d2a3b137e9e29/packages/node-resolve/package.json#L55-L62