Skip to content

error TS2307: Cannot find module 'rollup' or its corresponding type declarations. #32

@StreetStrider

Description

@StreetStrider

I'm using this plugin and TS.
This line is problematic:

import { Plugin } from "rollup";

../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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions