找不到模块的声明文件。
我在尝试使用样式的组件v5.3.5创建全局样式时会有此错误。你们可以在这里帮我吗?
import { createGlobalStyle } from "styled-components";
export const GlobalStyle = createGlobalStyle`
:root {
--background: #f0f2f5;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
background-color: var(--background);
-webkit-font-smoothing: antialiesed;
}
`;
im having this error when trying to create a global style using styled components v5.3.5. Can you guys help me here please?
import { createGlobalStyle } from "styled-components";
export const GlobalStyle = createGlobalStyle`
:root {
--background: #f0f2f5;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
background-color: var(--background);
-webkit-font-smoothing: antialiesed;
}
`;
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该错误应通过
解决
npm I -D @types/stypled -components @最新
This error should be resolved with
npm i -D @types/styled-components@latest