trufflemigrate 컴파일된 스마트 계약을 배치할 수 없습니다.Error: No network specified.

migrate가 Tunffle을 통해 컴파일된 이더리움 스마트 계약을 배치할 수 없습니다.나는 이렇게 했다.
truffle init
truffle compile
open other terminal and run testrpc
truffle migrate

세 걸음 모두 정상적으로 지나갔는데, 내가 운행truffle migrate할 때 이 문제가 발생했다.
Error: No network specified. Cannot determine current network.
    at Object.detect (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:43157:23)
    at /usr/local/lib/node_modules/truffle/build/cli.bundled.js:200497:19
    at finished (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:43085:9)
    at /usr/local/lib/node_modules/truffle/build/cli.bundled.js:198408:14
    at /usr/local/lib/node_modules/truffle/build/cli.bundled.js:68162:7
    at /usr/local/lib/node_modules/truffle/build/cli.bundled.js:163793:9
    at /usr/local/lib/node_modules/truffle/build/cli.bundled.js:160353:16
    at replenish (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:160873:25)
    at iterateeCallback (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:160863:17)
    at /usr/local/lib/node_modules/truffle/build/cli.bundled.js:160838:16

개발 환경: - node 9.1.0 - truffle 4.0.1 - testrpc 6.0.3
해결 방법:
프로필truffel을 설정해야 합니다.js에 설정된 네트워크networks는 프로젝트 폴더의 루트 디렉터리에 있습니다.
module.exports = {
  networks: {
    development: {
      host: "localhost",
      port: 8545,
      network_id: "*" //  id 
    }
  }
};

원문:http://cw.hubwiz.com/card/c/ethereum-FAQ/1/2/2/
그리고 이전 강좌를 추천합니다.
  • python 이더리움은 주로python이 웹3을 둘러싼 것을 겨냥한다.py는 블록체인 이더리움 응용 개발에 대한 설명을 진행한다.
  • 웹3j는 주로 자바와android 프로그래머가 웹3j 라이브러리를 둘러싸고 블록체인 이더리움 개발에 대한 설명을 한다.
  • php이더리움은 주로 php를 이용하여 스마트 계약 개발 상호작용을 하고 계정 생성, 거래, 이체, 토큰 개발과 필터와 사건 등 내용을 소개한다.
  • 이더리움 개발은 주로 node를 사용하는 것을 소개한다.js, mongodb, 블록체인, ipfs는 탈중심화 전자상거래 DApp 실전을 실현하여 진급에 적합하다.
  • 이더리움 강좌는 주로 스마트 계약과dapp 응용 개발을 소개하여 입문하기에 적합하다.
  • 좋은 웹페이지 즐겨찾기