I tried solutions provided in ethereum stack, but nothing worked for me.
My smart contract file:
pragma solidity ^0.4.15;
contract Election {
string public candidate;
function Eletion () public {
candidate = "Candidate 1";
}
}
Migration file:
var Election = artifacts.require("./Election.sol");
module.exports = function(deployer) {
deployer.deploy(Election);
};
Im getting the following Error
Using network 'development'.
Running migration: 2_deploy_contracts.js
C:\Users\jeevastella\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:59973 throw new Error("Could not find artifacts for " + import_path + " from any sources"); ^ C:\Users\jeevastella\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:59973 throw new Error("Could not find artifacts for " + import_path + " from any sources"); ^
Error: Could not find artifacts for ./Election from any sources at Resolver.require (C:\Users\jeevastella\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:59973:9) at Object.require (C:\Users\jeevastella\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:69602:36) at ResolverIntercept.require (C:\Users\jeevastella\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:197047:32) at C:\Users\jeevastella\Desktop\election\migrations\2_deploy_contracts.js:1:26 at Script.runInContext (vm.js:107:20) at Script.runInNewContext (vm.js:113:17) at C:\Users\jeevastella\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:101639:14 at FSReqWrap.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:53:3)