gpt4 book ai didi

nearprotocol - 在 NEAR : `/bin/sh: asb: command not found` when deploying Guest Book with yarn 上的 AssemblyScript

转载 作者:行者123 更新时间:2023-12-04 08:02:17 24 4
gpt4 key购买 nike

运行 GuestBook example 时在 NEAR 上使用 yarn deploy产生以下错误:

/bin/sh: asb: command not found
这似乎发生在使用 Figment Learn NEAR path 的人身上。同样,基于 Discord conversations .
运行
npm install asb
返回
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: assemblyscript@0.17.14
npm WARN node_modules/assemblyscript
npm WARN assemblyscript@"^0.17.3" from near-sdk-core@2.2.4
npm WARN node_modules/near-sdk-core
npm WARN near-sdk-core@"^2.2.4" from near-sdk-as@2.2.4
npm WARN node_modules/near-sdk-as
npm WARN 1 more (@as-pect/cli)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer assemblyscript@"^0.13.3" from visitor-as@0.3.2
npm WARN node_modules/visitor-as
npm WARN visitor-as@"^0.3.2" from near-sdk-core@2.2.4
npm WARN node_modules/near-sdk-core
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/asb - Not found
npm ERR! 404
npm ERR! 404 'asb@*' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
编辑:
许多 yarn installyarn update命令稍后,错误似乎已迁移到丢失的 asc图书馆:
$ asb
node:internal/modules/cjs/loader:926
throw err;
^

Error: Cannot find module 'assemblyscript/cli/asc'

最佳答案

您是对的 asb命令是 asbuild 的缩写(这是另一个别名命令),它是 near-sdk-as 的依赖项并且应该用 yarn 安装或 yarn install .asc ,安装为 assemblyscript , 也应该存在,因为它是 near-sdk-as 的依赖项.所以没有被发现是可疑的。我的猜测是:

  • 您需要运行 yarn首先安装一切。
  • 不知何故 NODE_ENV设置为 "production" ,然后导致 yarn仅安装 dependencies而不是 devDependencies .要解决此问题,请使用 NODE_ENV= 取消设置它或 export NODE_ENV= .然后运行 ​​yarn再次。

  • 我的一个投诉 npmyarn是你需要有一个安装步骤。 Rust 的 cargo根据需要安装依赖项。

    关于nearprotocol - 在 NEAR : `/bin/sh: asb: command not found` when deploying Guest Book with yarn 上的 AssemblyScript,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66398136/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com