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

Typescript Error #627

Open
stevengrimaldo opened this issue Nov 30, 2022 · 0 comments
Open

Typescript Error #627

stevengrimaldo opened this issue Nov 30, 2022 · 0 comments

Comments

@stevengrimaldo
Copy link

stevengrimaldo commented Nov 30, 2022

  • polished version: ^4.2.2
  • JSS-in_CSS library and version: ^5.3.5
  • Any relevant JS library and version: Next.js 13.0.3

Mixin/Helper/Shorthand Usage

usage

import { rbga } from 'polished';

const shadeOf = (color: string, opacity: number): string =>
  rbga(color, opacity);

export default shadeOf;

tsconfig

{
  "compilerOptions": {
    "baseUrl": ".",
    // Target latest version of ECMAScript.
    "target": "es5",
    "lib": ["dom", "dom.iterable", "esnext"],
    // Process & infer types from .js files.
    "allowJs": true,
    "skipLibCheck": true,
    // Enable strictest settings like strictNullChecks & noImplicityAny.
    "strict": true,
    "forceConsistentCasingInFileNames": true,
    // Don't emit; allow Babel to transform files.
    "noEmit": true,
    // Import non-ES modules as default imports.
    "esModuleInterop": true,
    "module": "esnext",
    // Search under node_modules for non-relative imports.
    "moduleResolution": "node",
    "resolveJsonModule": true,
    // Disallow features that require cross-file information for emit.
    "isolatedModules": true,
    "jsx": "preserve",
    "incremental": true,
    "paths": {
      "@assets/*": ["public/*"],
      "@components": ["components"],
      "@components/*": ["components/*"],
      "@global": ["global"],
      "@global/*": ["global/*"],
      "@icons/*": ["public/icons/*"]
    }
  },
  "include": ["next-env.d.ts", "styled.d.ts", "**/*.ts", "**/*.tsx"],
  "exclude": ["node_modules", "build", "dist", "public", "cache"]
}

What You Are Seeing

"Module '"polished"' has no exported member 'rbga'."

It wont let me upload an image, it has failed 7 times now. There is a red line under the word "rbga" in the import line and shows that message above.

What You Expected To See

No typescript error

Reproduction

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

No branches or pull requests

2 participants