标签: remix

(ESLint/Cypress):解析错误:ESLint 被配置为使用“parserOptions.project”在“<tsconfigRootDir>/component/TestComponent.cy.ts”上运行

我正在使用 Remix (remix.run) 设置一个新项目,并尝试配置 Cypress/ESLint 进行组件测试。我有TestComponent.cy.ts一些样板代码:

describe('TestComponent.cy.ts', () => {
  it('playground', () => {
    // cy.mount()
  })
})
Run Code Online (Sandbox Code Playgroud)

但是,该describe函数会抛出此错误:

    Parsing error: ESLint was configured to run on `<tsconfigRootDir>/component/TestComponent.cy.ts` using `parserOptions.project`: <tsconfigRootDir>/../../../../../../users/tduke/desktop/dev/blog/cypress/tsconfig.json
    However, that TSConfig does not include this file. Either:
    - Change ESLint's list of included files to not include this file
    - Change that TSConfig to include this file
    - Create a new TSConfig that includes this file and include it in your parserOptions.project

Run Code Online (Sandbox Code Playgroud)

我尝试重新配置我的 …

typescript reactjs tsconfig remix typescript-eslint

48
推荐指数
4
解决办法
8万
查看次数

警告:源文件中未提供 SPDX 许可证标识符

我创建了一个新的 Solidity 合约。合同已启动并正在运行,但给了我这个警告。

Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: <SPDX-License>" to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information.
Run Code Online (Sandbox Code Playgroud)

编译时没有错误。

我在https://remix.ethereum.org/ 中使用的编译器版本是 v0.7.5+commit.eb77ed08 语言:Solidity EVM 版本:编译器默认值

每当我按下编译时,它都会给我警告,但部署时没有问题。

我的代码片段:

pragma solidity ^0.7.5;
contract TestContract {
// Some logic
}


Run Code Online (Sandbox Code Playgroud)

blockchain solidity remix

11
推荐指数
1
解决办法
1万
查看次数

使用 Remix 与 ABI 部署的合约进行交互

如何在没有源代码的情况下使用 Remix 与以太坊上已部署的合约(不是我的合约)进行交互,但我有 ABI。

我想要这样做的原因是因为某些合同有超过 20 个 .sol 文件,我不想手动复制并粘贴到 Remix 中。

abi ethereum smartcontracts remix

11
推荐指数
1
解决办法
2818
查看次数

未捕获的类型错误:无法读取 null 的属性(读取“useEffect”)

编辑

那么,到底是什么问题呢?我有两个 React 和 ReactDOM 实例为所提供的applicationB. 我在诊断问题空间时被误导了,因此下面提出的问题/呼吁有点全面。应该拿走什么,希望它可以帮助处于这个位置的其他人:

reactjs npm-link remix react-hooks esbuild

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

将 Remix Ethereum IDE 连接到本地主机

我想将 Remix - Ethereum IDE ( https://remix.ethereum.org ) 连接到本地主机。

我按照说明进行操作https://remix-ide.readthedocs.io/en/latest/remixd.html#update-to-the-latest-remixd

  1. npm install -g @remix-project/remixd使用 npm 安装了 remix 守护进程。
  2. 我创建了文件夹mkdir ~/shared_project.
  3. chmod u+rw shared_project我为本地用户授予了该文件夹的读/写权限。
  4. 我启动了 remix 守护进程sudo remixd -s ~/shared_project --remix-ide https://remix.ethereum.org

问题是,当我想将浏览器中的 Remix IDE 连接到本地主机时,我可以看到带有错误消息的弹出窗口Cannot connect to the remixd daemon. Please make sure you have the remixd running in the background.

我尝试重新启动守护进程:

  1. ps -ef | grep remixd
  2. sudo kill 1007
  3. sudo remixd -s ~/shared_project --remix-ide https://remix.ethereum.org

我尝试重新安装守护进程:

  1. sudo …

bash blockchain ethereum remix

10
推荐指数
1
解决办法
1052
查看次数

Solidity - 无效的 BigNumber 字符串(参数 =“value”值 =“”代码 = INVALID_ARGUMENT 版本 = bignumber/5.4.2)

这里是坚固的新手。当我尝试读取 people 数组的值时。我收到错误:

对 SimpleStorage.people 的调用出错:对参数进行编码时出错:错误:无效的 BigNumber 字符串(参数 =“值”值 =“”代码=INVALID_ARGUMENT 版本=bignumber/5.4.2)

我的编译器版本是0.6.6。不确定出了什么问题?有什么建议么?

// SPD-License_Identifier: MIT

pragma solidity ^0.6.0;

contract SimpleStorage {
    uint256 favNum;
    
    struct People {
        uint256 favNum;
        string name;
    }
    
    People[] public people;
    
    function store(uint256 _favNum) public {
        favNum = _favNum;
    }
    
    function retrieve() public view returns(uint256) {
        return favNum;
    }
    
    function addPerson(string memory _name, uint256 _favNum) public {
        people.push(People(_favNum, _name));
    }
}
Run Code Online (Sandbox Code Playgroud)

solidity remix

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

错误:编译器版本 ^0.8.0 不满足 r semver 要求

我是 Solidity 新手,正在 Remix 上运行代码。无论我指定什么版本的编译器,我都会不断收到相同的错误。有人可以帮我吗?“编译器版本 ^0.8.0 不满足 r semver 要求”到底是什么意思?

这是我的代码:

// SPDX-License-Identifier: UNLICENSED
Run Code Online (Sandbox Code Playgroud)

编译指示可靠性 ^ 0.8.0;

合约存储{

struct People {
    uint256 favoriteNumber;
    string name;
}

mapping(string => uint256) public nameToFavoriteNumber;
People[] public people;

function addPerson(uint _personFavoriteNumber, string memory _personName ) public {
    people.push(People({favoriteNumber: _personFavoriteNumber, name: _personName}));
    nameToFavoriteNumber[_personName] = _personFavoriteNumber;
}
Run Code Online (Sandbox Code Playgroud)

} 这是我的截图

semantic-versioning solidity remix

8
推荐指数
1
解决办法
3382
查看次数

如何控制台登录 remix IDE

我正在尝试控制台和调试代码或可靠性

我正在使用https://remix.ethereum.org/

debugging solidity remix

8
推荐指数
1
解决办法
1万
查看次数

编写混音单元测试时出错:URL无法解析:remix_accounts.sol

我正在用remix-ide编写单元测试,我想在一个测试中从不同地址调用函数。

混音检验Github上页说,你可以用import "remix_accounts.sol";,但我得到URL not parseable: remix_accounts.sol。如何解决?或者,也许还有另一种从各个地址拨打电话的方式?

unit-testing solidity remix

7
推荐指数
1
解决办法
119
查看次数

在 remix Ide 中这个通知意味着什么?“您尚未设置要运行的脚本。使用 @custom:dev-run-script NatSpec 标记进行设置”

您尚未设置要运行的脚本。使用 @custom:dev-run-script NatSpec 标签进行设置

通知消息

我在Remix IDE中编写了一个简单的Hello World程序。

blockchain solidity remix

7
推荐指数
1
解决办法
1万
查看次数