current position:Home>Truffle's first windows experience

Truffle's first windows experience

2022-01-26 21:31:22 Roway

First step : install nodejs

The second step : install truffle

 Get into cmdD:\truffle>npm install -g truffle

The third step :

D:\truffle>npm install ganache-cli -g

start-up ganache

D:\truffle>ganache-cli

Ganache CLI v6.12.2 (ganache-core: 2.13.2)

explain : Here, if you use the following command to install , The deployment will report an error at that time 【 Remember not to use this outdated installation method --- Step on the pit !!!】

  • This kind of error message :VM Exception while processing transaction: invalid opcode*
  • npm -g install [email protected]
  • D:\truffle\MetaCoin>TestRPC*
  • EthereumJS TestRPC v6.0.3 (ganache-core: 2.0.2)*

Step four :

 Into a new cmd    mkdir MetaCoin    cd MetaCoind:\truffle\MetaCoin>truffle unbox metacoin

explain : There may be a mistake here 【Got error: getaddrinfo ENOENT raw.githubusercontent.com.】

 The solution is :    1、 see raw.githubusercontent.com The real IP Address 【https://www/ipaddress.com/】    2、 Find out ip, Configuration to C:\Windows\System32\drivers\etc\hosts In the document          such as :185.199.108.133 raw.githubusercontent.com                    185.199.109.133 raw.githubusercontent.com                    185.199.110.133 raw.githubusercontent.com                    185.199.111.133 raw.githubusercontent.com

Step five :

 modify :truffle-config.js file 

Step six :

truffle compiletruffle migratetruffle test

copyright notice
author[Roway],Please bring the original link to reprint, thank you.
https://en.cdmana.com/2022/01/202201262131207241.html

Random recommended