Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using npm package that exports scss file #282

Open
in-in opened this issue Feb 18, 2025 · 1 comment
Open

Error when using npm package that exports scss file #282

in-in opened this issue Feb 18, 2025 · 1 comment

Comments

@in-in
Copy link

in-in commented Feb 18, 2025

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

@bugfix2020
Copy link

same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants