When I am trying to create new truffle project with truffle init
in a not empty folder (with IDE folder and .gitignore
file) I have received an error:
Error: Something already exists at the destination. Please unbox in an empty folder. Stopping to prevent overwriting data.
at C:\Users\...\Roaming\npm\node_modules\truffle\build\webpack:\~\truffle-box\lib\utils\unbox.js:22:1
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
at Function.Module.runMain (module.js:686:11)
at startup (bootstrap_node.js:187:16)
at bootstrap_node.js:608:3
How can I force truffle to create a new project in any case?
Please unbox in an empty folder
(a few exclamation marks would probably be in place at this point). First calltruffle init
in an empty folder, and then copy the output to anywhere you want.--force
, if I am shure that I want to init project in this not empy directory in any casenpm install
), and hell, you could even add your own flag in there two... But I think that the steps I suggested in my previous comment are a better way of achieving this goal.