Hey everyone,
I’m stuck and I’m sure it’s a simple fix but I can’t seem to figure it out. When I updated my 2_HelloWorlddeploy contract and migrated it (used --reset) it gave me the following error below.
Compiling your contracts…
Everything is up to date, there is nothing to compile.
ExtendableError: Unknown network “ganache”. See your Truffle configuration file for available networks.
at Object.validateNetworkConfig (C:\Users\alanm\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\environment\environment.js:111:1)
at Object.detect (C:\Users\alanm\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\environment\environment.js:16:1)
at C:\Users\alanm\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\core\lib\commands\migrate.js:206:1
truffle(ganache)> migrate --reset
Compiling your contracts…
Everything is up to date, there is nothing to compile.
ExtendableError: Unknown network “ganache”. See your Truffle configuration file for available networks.
at Object.validateNetworkConfig (C:\Users\alanm\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\environment\environment.js:111:1)
at Object.detect (C:\Users\alanm\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\environment\environment.js:16:1)
at C:\Users\alanm\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\core\lib\commands\migrate.js:206:1
truffle(ganache)> instance = await Helloworld.deployed()
Here is my code for the deploy contract, I believe it is the exact same that @filip has:
const HelloWorld = artifacts.require(“HelloWorld”);
module.exports = function (deployer) {
deployer.deploy(HelloWorld).then(function(instance){
instance.setMessage(“Hello Again!”).then(function(){
instance.getMessage().then(function(message){
console.log("Current message: " + message);
});
});
});
};
I got my issue solved on my own. It was small but still feels like an accomplishment. I updated everything to 0.8.0 as well as added // SPDX-License-Identifier: MIT