Open shinriyo opened 2 years ago
@shinriyo
I was in the same situation. However, I can get this result by using same testcode.
/greeter$ truffle test
Compiling your contracts...
===========================
> Compiling ./contracts/Migrations.sol
> Artifacts written to /tmp/test--1938-wSClWNsNdPfO
> Compiled successfully using:
- solc: 0.8.9+commit.e5eed63a.Emscripten.clang
Error: Could not find artifacts for Greeter from any sources
I suspect that the problem is the versioning problem of Node.js and Truffle . Can you tell me each version?
Each version of me is below.
Truffle v5.4.16 (core: 5.4.16)
Node v14.18.0
Each version of this book is below
Truffle v5.1.31 (core: 5.1.30)
Node v10.21.0
I was in the same situation in M1 mac and use asdf to install nodejs.
after I run truffle compile
, truffle test
was succeeded. (why?)
my env
❯ truffle version
Truffle v5.4.32 (core: 5.4.32)
Solidity v0.5.16 (solc-js)
Node v16.4.2
Web3.js v1.5.3
I bought the book, "Hands-On Smart Contract Development with Solidity and Ethereum" in Japanese Edition.
I run the first
truffle test
command in chapter4 inhoscdev/chapter-4/greeter
path.The book says the result is "Could not find artifacts got Greeter grom any sources". However, the commands stop forever.