小编Yah*_*var的帖子

找不到模块:无法解析“@emotion/react”

我想安装neumorphism-react

但我收到了这个错误

找不到模块:无法解析“C:\Users\Asus\Desktop\react projects\visitor\node_modules@emotion\styled\base\dist”中的“@emotion/react”

这是依赖项 package.json

"@emotion/core": "^11.0.0",
"@emotion/styled": "^11.0.0",
"@testing-library/jest-dom": "^5.11.6",
"@testing-library/react": "^11.2.2",
"@testing-library/user-event": "^12.6.0",
"neumorphism-react": "^1.1.1",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-scripts": "4.0.1",
"semantic-ui-react": "^2.0.1",
"web-vitals": "^0.2.4"
Run Code Online (Sandbox Code Playgroud)

reactjs

13
推荐指数
9
解决办法
2万
查看次数

命名参数 'colors' 未定义。flutter

当我想将渐变颜色传递给它时,我正在为我的自定义按钮使用渐变,它显示错误

未定义命名参数“颜色”。

我该如何解决?

在此处输入图片说明

dart flutter

9
推荐指数
1
解决办法
3495
查看次数

React打字稿中的react-google-recaptcha“ref”类型错误

我正在尝试在类型脚本项目中reCaptchareact-google-recaptcha中实现不可见

我添加了包的类型

yarn add @types/react-google-recaptcha
Run Code Online (Sandbox Code Playgroud)

但是当我想实现该组件时,我在这里收到类型脚本错误

  <ReCAPTCHA
        ref={recaptchaRef} // IN HERE
        size="invisible"
        sitekey="Your client site key"
      />
Run Code Online (Sandbox Code Playgroud)

这是错误的内容

 Type 'MutableRefObject<undefined>' is not assignable to type 'LegacyRef<ReCAPTCHA> | undefined'.''
 Type 'MutableRefObject<undefined>' is not assignable to type 'RefObject<ReCAPTCHA>'.
 Types of property 'current' are incompatible.
Run Code Online (Sandbox Code Playgroud)

typescript reactjs invisible-recaptcha react-google-recaptcha

9
推荐指数
1
解决办法
8140
查看次数

模块“hardhat”没有导出成员“ethers”

当我想ethers从中导入时hardhat,会抛出我在标题中提到的错误,这里是完整版本

 - error TS2305: Module '"hardhat"' has no exported member 'ethers'.
 
     2 import { ethers } from "hardhat";
                ~~~~~~
Run Code Online (Sandbox Code Playgroud)

虽然我在之前的项目中以同样的方式使用它并且看到每个人都这样做

typescript reactjs hardhat

8
推荐指数
2
解决办法
6585
查看次数

不良状态:无元素

我只是想知道那是做什么用的?当它到来时,是 API 问题吗?

         BlocBuilder<OrderBloc, OrderState>(
                  builder: (context, finalstate) {
                    if (state is OrderLoaded) {
                      for (var item in state.orderSent) {
                        totalweightsforsent.add(item.totalWeight);
//right here when i fetch the data from API and when it is done it is not going forward anymore
                      }
                      for (var item in state.orderPackaging) {
                        totalforpacking.add(item.totalWeight);
                      }
Run Code Online (Sandbox Code Playgroud)

dart flutter

3
推荐指数
1
解决办法
4285
查看次数

如何在不使用android studio的情况下下载android模拟器

由于过滤,我无法使用 Android Studio 下载 android 模拟器。
那么如何在没有 Android Studio 的情况下下载模拟器呢?有没有网站可以这样做?

dart flutter

3
推荐指数
1
解决办法
3922
查看次数

颤动如何为行中的每个子项设置多个交叉轴对齐

如何为行或列的每个子项设置不同的横轴对齐方式?

    return Row(
      crossAxisAlignment: CrossAxisAlignment.start,
      children: [
        Container(width: 100, height: 100, color: Colors.blue),
        Container(width: 100, height: 500, color: Colors.red),
        Container(width: 100, height: 300, color: Colors.green),
        Container(width: 100, height: 200, color: Colors.yellow),
        Container(width: 100, height: 100, color: Colors.purple),
      ],
    );
Run Code Online (Sandbox Code Playgroud)

我想在顶部放蓝色框,中间放绿色,底部放黄色

flutter

2
推荐指数
1
解决办法
307
查看次数

使用 Next.js 和样式组件的本地字体

我想将本地字体添加到项目中。
我正在使用next.jsglobalStyles来自styled-components.

这是我到目前为止所做的

import regularFont from "../public/fonts/IRANYekanRegular.ttf";

const GlobalStyle = createGlobalStyle<{ lang?: Languages_type | string }>`
@font-face {
  font-family: "ir";
  src: local("ir"), url(${regularFont}) format("truetype");
}     
 
body,
html {
  margin: 0;
  font-family:"ir ";
}

`;
Run Code Online (Sandbox Code Playgroud)

但是使用上面的代码它会抛出错误并提示

./public/fonts/IRANYekanRegular.ttf 模块解析失败:意外字符 '' (1:0) 您可能需要适当的加载程序来处理此文件类型,当前没有配置加载程序来处理此文件。请参阅https://webpack.js.org/concepts#loaders(此二进制文件省略了源代码)

我缺少什么?

reactjs styled-components next.js

0
推荐指数
1
解决办法
3239
查看次数