第一次使用,按照网上教程出现出现错误.
Error: `truffle init` no longer accepts a project template name as an argument.
- Or, browse the Truffle Boxes at <http://truffleframework.com/boxes>!
mec@mecC:~/ETH$ truffle version
Truffle v4.1.0 (core: 4.1.0)
Solidity v0.4.19 (solc-js)
发现版本是4.1 命令已经更新了,通过如下方式
truffle unbox webpack 即可
testRPC报错
Error: listen EADDRINUSE :::8545
at Object._errnoException (util.js:1022:11)at _exceptionWithHostPort (util.js:1044:20)
at Server.setupListenHandle [as _listen2] (net.js:1351:14)
at listenInCluster (net.js:1392:12)
at Server.listen (net.js:1476:7)
lsof -i:8545 找到pid 然后 kill -9 pid
mec@mecC:~/ETH$ npm run dev
npm ERR! path /home/mec/ETH/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/home/mec/ETH/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
使用truffle unbox webpack ,而不是truffle unbox metacoin 即可