Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
松露迁移 --compile-all --reset --network ganache
一切都是最新的,没有什么要编译的。
未知网络“ganache”。有关可用网络,请参阅您的 Truffle 配置文件。
默认情况下你不需要指定--networktruffle 会自动连接到 Ganache。另一方面,如果要将名称 ganache 配置为网络,则必须truffle-config.js按如下方式修改文件:
--network
truffle-config.js
networks: { //..., ganache: { host: "127.0.0.1", port: YOUR_GANACHE_PORT, // (default: 5777) network_id: "YOUR_GANACHE_NETWORK_ID", // (default: *) }, //... }
检查此图片以查看 Ganache 端口和 network_id