question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

csstype ColorAdjust is deprecated and causes error on build

See original GitHub issue

Description

I expect to be able to compile my project using Vite. The project did not compile but instead I received the error message " Namespace ‘“/home/frank/git/chakra-ui-ColorAdjust-bug/node_modules/csstype/index”.Property’ has no exported member ‘ColorAdjust’."

Link to Reproduction

https://github.com/honungsburk/chakra-ui-coloradjust-bug

Steps to reproduce

  1. Set up the repository I have linked
  2. npm install
  3. npm run build

should produce the errors:


node_modules/@chakra-ui/menu/dist/declarations/src/use-menu.d.ts:480:50 - error TS2694: Namespace '"/home/frank/git/chakra-ui-ColorAdjust-bug/node_modules/csstype/index".Property' has no exported member 'ColorAdjust'.

480         colorAdjust?: import("csstype").Property.ColorAdjust | undefined;
                                                     ~~~~~~~~~~~

node_modules/@chakra-ui/menu/dist/declarations/src/use-menu.d.ts:986:61 - error TS2694: Namespace '"/home/frank/git/chakra-ui-ColorAdjust-bug/node_modules/csstype/index".Property' has no exported member 'ColorAdjust'.

986         WebkitPrintColorAdjust?: import("csstype").Property.ColorAdjust | undefined;
                                                                ~~~~~~~~~~~

Chakra UI Version

1.8.6

Browser

No response

Operating System

  • macOS
  • Windows
  • Linux

Additional Information

Seems like if “ColorAdjust” is replaced with “PrintColorAdjust” everything compiles. I can update my node_modules/ manually until there is a real fix.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:5
  • Comments:19 (2 by maintainers)

github_iconTop GitHub Comments

10reactions
iffacommented, Mar 14, 2022
"resolutions": {
  "csstype": "3.0.10"
}

Adding this to package.json should act as a workaround to the issue for now.

3reactions
shadyazizacommented, Mar 11, 2022

Having the same issue using yarn build, I am also using Vite.

Read more comments on GitHub >

github_iconTop Results From Across the Web

1 - Stack Overflow
Electron Typescript Material-UI withStyles error TS2694: Namespace '".../node_modules/csstype/index"' has no exported member 'FontFace'.
Read more >
csstype - npm
TypeScript icon, indicating that this package has built-in type ... with new releases sometimes causes type errors even if it should work.
Read more >
node_modules/puppeteer/lib/types.d.ts - devtools ... - Google Git
An example of using a {@link Browser} to create a {@link Page}: ... If the element is detached from DOM, the method throws...
Read more >
Attribute selectors - CSS: Cascading Style Sheets | MDN
The CSS attribute selector matches elements based on the presence or value of a given attribute.
Read more >
Safari Technology Preview Release Notes - Apple Developer
Changed animation-* declarations in @keyframes to be a parse error (254468@main) ... when creating an ImageBitmap from Blob (253004@main); Deprecated window.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found