Created Truffle project with truffle init
. The project has two simple contracts written in Vyper. I configure the project's truffle-config.js
to point at Ganache-UI.
Using truffle test
, my contracts deploy to Ganache-UI and unit tests pass. I see the expected activity in Ganache-UI's transactions, blocks, and log tabs.
Because I'm learning to write Ethereum smart contracts, I want the extra runtime information Ganache-UI says I can get by linking it to my Truffle project. I added my truffle-config.js
to a Ganache-UI workspace.
But when I run the Workspace and go to the Contract's tab, there are no contracts. Instead, there's an error message:
Could not find 'node'. Node.js is required to be installed to link Truffle projects.
Check the project configuration or try restarting Ganache.
I'm using:
- ganache-ui: 2.5.4
- macos: 13.1
- truffle: 5.7.3
- ganache: 7.7.3
- solidity: 0.8.17
- node: 18.8.0
- web3.js: 1.8.1
The Ganache-UI error message is mystifying. Node is installed and works. Restarting Ganache-UI doesn't fix the problem.
How can I successfully link my Truffle project to Ganache-UI?
My truffle-config.js
. Created by truffle init
. Only change, uncomment developer
network section and change port to my Ganache-UI's port.
module.exports = {
networks: {
development: {
host: "127.0.0.1",
port: 7545,
network_id: "*"
}
},
mocha: { },
compilers: { solc: { version: "0.8.17" } }
};
/opt/homebrew/bin/node
.ganache-cli
. Also, I don't use Truffle any more because I didn't want its required contract versioning. Instead I directly use the native W3 clients for languages I work with: Web3J, Web3j, and Web.py.