Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

esbuild-style-plugin can cause type issues for sass #7430

Closed
@mattrunyon

Description

@mattrunyon

Problem

The dependencyesbuild-style-plugin installs@types/sass: ^1.43.1. This currently resolves to1.45.0 which is a deprecation version that doesn't actually include any type files. In our project, this was causing typescript errors because it is trying to load the types from@types/sass globally since we didn't change a default tsconfig option.

The error message we received

error TS2688: Cannot find type definition file for 'sass'.   The file is in the program because:     Entry point for implicit type library 'sass'

Someone opened a PR to remove the types dependency, but it seemsesbuild-style-plugin is abandoned.g45t345rt/esbuild-style-plugin#28

Potential Solution

I think movingesbuild-style-plugin to a dev dependency will prevent others from running into this. I'm not sure why it would need to be a regular dependency as there are other esbuild plugins as dev dependencies already in plotly.js.

Workaround/Fix for users

For anybody looking for a fix that doesn't need an update from plotly, we needed to add"types": ["node", "jest"] tocompilerOptions in ourtsconfig.json. This prevents the default behavior of looking at every@types module for global declarations which was causing the type error. In our case we only referenceprocess and the Jest globals. You might need to add additional types depending on your project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp