I'm trying to use yarn dev
to run the guest-book example following the guest-book example, but this is what I got:
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.
I think the error is this:
'asb' is not recognized as an internal or external command,
operable program or batch file.
The script in package.json is:
"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"
I've tried installing dependencies again, but it didn't work. I believe I'm running under the same directory as package.json. What can I do here? What causes the error with 'asb'? Thanks for any help!
Moving my answer from the comment:
yarn
and then yarn dev
should just work. Try using regular Windows terminal (cmd or powershell).
Your VS code seems to use mingw (bash for Windows) environment, which brings its own set of quirks. You may want to switch your default terminal in VS code back to cmd or powershell.