【发布时间】:2021-10-08 05:38:22
【问题描述】:
我正在尝试使用yarn dev 来运行guest-book example 之后的留言簿示例,但这就是我得到的:
Computer@Summerbook MINGW64 ~/Documents/VS Code Projects/near apps/guest-book (master)
$ yarn dev
yarn run v1.22.11
$ yarn build:contract:debug && near dev-deploy && nodemon --watch assembly -e ts --exec yarn dev:start
$ asb --target debug
'asb' is not recognized as an internal or external command,
operable program or batch file.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
我认为错误是这样的:
'asb' is not recognized as an internal or external command,
operable program or batch file.
package.json 中的脚本是:
"scripts": {
"build": "yarn build:contract && yarn build:web",
"build:contract": "asb",
"build:contract:debug": "asb --target debug",
"build:web": "parcel build src/index.html --public-url ./",
"deploy": "yarn build && near deploy && gh-pages -d dist/",
"dev": "yarn build:contract:debug && near dev-deploy && nodemon --watch assembly -e ts --exec yarn dev:start",
"lint": "eslint \"./**/*.js\" \"./**/*.jsx\"",
"start": "yarn deploy && parcel src/index.html",
"dev:start": "env-cmd -f ./neardev/dev-account.env parcel src/index.html",
"test": "yarn build:contract:debug && asp && jest"
我已尝试再次安装依赖项,但没有成功。 我相信我在与 package.json 相同的目录下运行。 我可以在这里做什么?是什么导致“asb”出现错误?感谢您的帮助!
【问题讨论】:
-
yarn然后yarn dev应该可以正常工作,尽管我从未在 mingw 下尝试过。尝试使用常规 Windows 终端(cmd 或 powershell)。如果这没有帮助,请尝试从头开始设置项目并提供整个过程的完整日志 -
我尝试了
yarn然后yarn dev并且成功了!我在 VS Code 中使用常规 Windows 终端而不是终端有什么不同吗?谢谢!
标签: visual-studio nearprotocol