truffle icon indicating copy to clipboard operation
truffle copied to clipboard

npx truffle init does not create Migrations.sol

Open cuongrep opened this issue 2 years ago • 2 comments


Issue

What the issue is, in broad strokes.

Steps to Reproduce

Please provide the shortest amount of steps to reproduce your issue.

Expected Behavior

I hope that the Migrations.sol file will be automatically generated when we initial a new solidity project using truffle.

Actual Results

When I create a new solidity project using truffle command "npx truffle init". I found that no any Migrations.sol file is created

Environment

  • Operating System: macOS
  • Ethereum client:
  • Truffle version (truffle version): v5.5.29
  • node version (node --version): v16.16.0
  • npm version (npm --version): 8.7.0

cuongrep avatar Sep 12 '22 12:09 cuongrep

Hello @cuongrep. Thanks for bringing this up. Truffle has removed the inclusion of Migration.sol on npx truffle init command since v5.5.27. Now when you run npx truffle init, it includes the following -

  • an empty contracts folder.
  • an empty migrations folder.
  • an empty test folder.
  • a .gitignore file.
  • a truffle-config.js file.

Please let us know if this information is helpful.

sukanyaparashar avatar Sep 12 '22 18:09 sukanyaparashar

Maybe we should make it an option for truffle init, like truffle init --with-migrations. But yeah honestly I recommend never using on-chain migrations.

gnidan avatar Sep 13 '22 20:09 gnidan

truffle unbox works fine for me

matteo-dirollo avatar Oct 01 '22 11:10 matteo-dirollo

Closing for issue maintenance.

cliffoo avatar Oct 13 '22 17:10 cliffoo

i'm having the same issue here

MontahaBouziri avatar Feb 21 '23 08:02 MontahaBouziri