0
D:\>truffle migrate --reset

Compiling your contracts...
===========================
> Compiling .\contracts\Migrations.sol
> Artifacts written to D:\build\contracts
> Compiled successfully using:
   - solc: 0.5.16+commit.9c3226ce.Emscripten.clang



Starting migrations...
======================
> Network name:    'ganache'
> Network id:      5777
> Block gas limit: 0x6691b7


1_initial_migration.js
======================

   Replacing 'Migrations'
   ----------------------
   > transaction hash:    0x4a691a6dcbd5a8cf87f274c0d13d5eebf6d3f8c52f833f49dc01054a093bc92d
   > Blocks: 0            Seconds: 0
   > contract address:    0xa6711a857E1DFF44D867baB8F00764A45DB3A978
   > block number:        3
   > block timestamp:     1584911889
   > account:             0xF6C0D0d48706A7749Ce3EB3889372Ab97d6827ab
   > balance:             99.99162066
   > gas used:            188483
   > gas price:           20 gwei
   > value sent:          0 ETH
   > total cost:          0.00376966 ETH


   > Saving migration to chain.
   > Saving artifacts
   -------------------------------------
   > Total cost:          0.00376966 ETH


2_deploy_contracts.js
=====================

Error: Migration D:\migrations\2_deploy_contracts.js invalid or does not take any parameters
    at Migration._load (C:\Users\LEILA-LAPTOP\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\migrate\migration.js:51:1)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at Migration.run (C:\Users\LEILA-LAPTOP\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\migrate\migration.js:167:1)
    at Object.runMigrations (C:\Users\LEILA-LAPTOP\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\migrate\index.js:148:1)
    at Object.runFrom (C:\Users\LEILA-LAPTOP\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\migrate\index.js:110:1)
    at Object.runAll (C:\Users\LEILA-LAPTOP\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\migrate\index.js:114:1)
    at Object.run (C:\Users\LEILA-LAPTOP\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\migrate\index.js:79:1)
    at runMigrations (C:\Users\LEILA-LAPTOP\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\core\lib\commands\migrate.js:253:1)
    at C:\Users\LEILA-LAPTOP\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\core\lib\commands\migrate.js:218:1
Truffle v5.1.18 (core: 5.1.18)
Node v13.11.0

0

It is possible to override default network with --network <NETWORK_NAME>.

truffle migration --network devel

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.