Skip to content

Error when using npm package that exports scss file #282

Open
@in-in

Description

@in-in

Describe the bug
When using an npm package that exports a scss file, an error occurs: "Property 'MenuEnter' does not exist on type '{}'"

To Reproduce
Steps to reproduce the behavior:

  1. npm install bulma
  2. add module to scss file (menu) @use "bulma/sass/utilities/mixins";
  3. use it
.MenuEnter {
  background: red;

  @include mixins.from(1280px) {
    background: blue;
  }
}
  1. import styles into .ts file import styles from "./menu.module.scss";
  2. Try using this styles.MenuEnter
  3. See error "Property 'MenuEnter' does not exist on type '{}'"

Expected behavior
No error messages

Screenshots
Image

Desktop (please complete the following information):

  • OS: Linux Mint 22 Cinnamon
  • Browser Chromium
  • Version 133.0.6943.53 (Official Build) for Linux Mint (64-bit)

Smartphone (please complete the following information):

I haven't checked.

Additional context
tsconfig.json

{
  "$schema": "https://json.schemastore.org/tsconfig",
  "compilerOptions": {
    "jsx": "react-jsx",
    "module": "esnext",
    "outDir": "${configDir}/dist",
    "moduleResolution": "bundler",
    "noEmitOnError": true,
    "plugins": [
      {
        "name": "typescript-plugin-css-modules",
        "options": {
          "goToDefinition": true
        }
      }
    ],
    "resolveJsonModule": true,
    "target": "esnext"
  },
  "exclude": ["node_modules", "${configDir}/dist"],
  "extends": ["@tsconfig/strictest/tsconfig"]
}

"typescript-plugin-css-modules": version "5.1.0"

bulma source: https://github.com/jgthms/bulma

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