I got the following error. Could you please show me how to fix the problem?
/tmp/x$ truffle init
Downloading...
Unpacking...
Setting up...
Unbox successful. Sweet!
Commands:
Compile: truffle compile
Migrate: truffle migrate
Test contracts: truffle test
/tmp/x$ truffle compile
Compiling ./contracts/Migrations.sol...
Writing artifacts to ./build/contracts
/tmp/x$ truffle migrate
Error: No network specified. Cannot determine current network.
at Object.detect (/Users/pengy/.nvm/versions/node/v9.9.0/lib/node_modules/truffle/build/webpack:/~/truffle-core/lib/environment.js:31:1)
at /Users/pengy/.nvm/versions/node/v9.9.0/lib/node_modules/truffle/build/webpack:/~/truffle-core/lib/commands/migrate.js:91:1
at finished (/Users/pengy/.nvm/versions/node/v9.9.0/lib/node_modules/truffle/build/webpack:/~/truffle-core/~/truffle-workflow-compile/index.js:53:1)
at /Users/pengy/.nvm/versions/node/v9.9.0/lib/node_modules/truffle/build/webpack:/~/truffle-core/~/truffle-compile/index.js:313:1
at /Users/pengy/.nvm/versions/node/v9.9.0/lib/node_modules/truffle/build/webpack:/~/truffle-core/~/truffle-compile/profiler.js:158:1
at /Users/pengy/.nvm/versions/node/v9.9.0/lib/node_modules/truffle/build/webpack:/~/truffle-core/~/truffle-compile/~/async/dist/async.js:3874:1
at /Users/pengy/.nvm/versions/node/v9.9.0/lib/node_modules/truffle/build/webpack:/~/truffle-core/~/truffle-compile/~/async/dist/async.js:473:1
at replenish (/Users/pengy/.nvm/versions/node/v9.9.0/lib/node_modules/truffle/build/webpack:/~/truffle-core/~/truffle-compile/~/async/dist/async.js:993:1)
at iterateeCallback (/Users/pengy/.nvm/versions/node/v9.9.0/lib/node_modules/truffle/build/webpack:/~/truffle-core/~/truffle-compile/~/async/dist/async.js:983:1)
at /Users/pengy/.nvm/versions/node/v9.9.0/lib/node_modules/truffle/build/webpack:/~/truffle-core/~/truffle-compile/~/async/dist/async.js:958:1
at /Users/pengy/.nvm/versions/node/v9.9.0/lib/node_modules/truffle/build/webpack:/~/truffle-core/~/truffle-compile/~/async/dist/async.js:3871:1
at /Users/pengy/.nvm/versions/node/v9.9.0/lib/node_modules/truffle/build/webpack:/~/truffle-core/~/truffle-compile/profiler.js:154:1
at /Users/pengy/.nvm/versions/node/v9.9.0/lib/node_modules/truffle/build/webpack:/~/truffle-core/~/truffle-compile/~/async/dist/async.js:1126:1
at /Users/pengy/.nvm/versions/node/v9.9.0/lib/node_modules/truffle/build/webpack:/~/truffle-core/~/truffle-compile/~/async/dist/async.js:473:1
at iteratorCallback (/Users/pengy/.nvm/versions/node/v9.9.0/lib/node_modules/truffle/build/webpack:/~/truffle-core/~/truffle-compile/~/async/dist/async.js:1050:1)
at /Users/pengy/.nvm/versions/node/v9.9.0/lib/node_modules/truffle/build/webpack:/~/truffle-core/~/truffle-compile/~/async/dist/async.js:958:1
at /Users/pengy/.nvm/versions/node/v9.9.0/lib/node_modules/truffle/build/webpack:/~/truffle-core/~/truffle-compile/~/async/dist/async.js:1123:1
at /Users/pengy/.nvm/versions/node/v9.9.0/lib/node_modules/truffle/build/webpack:/~/truffle-core/~/truffle-compile/profiler.js:133:1
at FSReqWrap.oncomplete (fs.js:171:5)
@pengyu, Even if you have ganache instance running, you need configure truffle.js to specify network to deploy(localhost/testnet/ethereum network). You can look up the documentation here.
I got the following error. Could you please show me how to fix the problem?