Truffle
如何解決此松露錯誤:“目的地已經存在某些東西”?
$ truffle init Downloading... Error: Something already exists at the destination. `truffle init` and `truffle unbox` must be executed in an empty folder. Stopping to prevent overwriting data. at C:\Users\Welcome\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\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:695:11) at startup (bootstrap_node.js:188:16) at bootstrap_node.js:609:3
truffle init
抱怨文件夾中存在任何文件,甚至是隱藏的文件,例如 (on macOS).DS_Store
。嘗試ls -A
從命令行列出所有文件。
正如錯誤消息所暗示的那樣,您需要刪除文件夾的內容,或創建一個新的空文件夾,在其中呼叫
truffle init
.