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

Could not find a declaration file for module '@styled-system/css' implicitly has an 'any' type. #1926

Open
hckhanh opened this issue Apr 15, 2021 · 1 comment
Labels

Comments

@hckhanh
Copy link

hckhanh commented Apr 15, 2021

I got this error when I try to build @styled-system/css with Storybook 6.2

ERR! TypeScript error in BaseButton.tsx(1,17):
ERR! Could not find a declaration file for module '@styled-system/css' implicitly has an 'any' type.
ERR!   Try `npm i --save-dev @types/styled-system__css` if it exists or add a new declaration (.d.ts) file containing `declare module '@styled-system/css';`  TS7016
ERR!
ERR!   > 1 | import css from "@styled-system/css";
ERR!       |                 ^
ERR!     2 | import { ReactNode } from "react";
ERR!     3 | import styled from "styled-components";
ERR!     4 | import {
ERR! Button.tsx
ERR! TypeScript error in Button.tsx(1,17):
ERR! Could not find a declaration file for module '@styled-system/css' implicitly has an 'any' type.
ERR!   Try `npm i --save-dev @types/styled-system__css` if it exists or add a new declaration (.d.ts) file containing `declare module '@styled-system/css';`  TS7016
ERR!
ERR!   > 1 | import css from "@styled-system/css";
ERR!       |                 ^
ERR!     2 | import styled from "styled-components";
ERR!     3 | import { compose, variant } from "styled-system";
ERR!     4 | import { BaseButton, BaseButtonProps } from "../BaseButton/BaseButton";
ERR!
@hckhanh hckhanh added the bug label Apr 15, 2021
@shawngustaw
Copy link

Have you tried running npm i --save-dev @types/styled-system__css?

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

No branches or pull requests

2 participants