blockchain-technical-practice / eth-weibo

这是一个运行在以太坊上的去中心微博系统
23 stars 16 forks source link

truffle compile error #2

Closed segogt closed 4 years ago

segogt commented 4 years ago

when I execute

truffle build

the error occured.

/usr/local/lib/node_modules/truffle/build/cli.bundled.js:151368
  var bufdir = Buffer.from(dir);
                      ^

TypeError: this is not a typed array.
    at Function.from (native)
    at Object.files (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:151368:23)
    at exports.fromCallback.exports.unique.exports.contain.module.exports (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:49951:7)
    at getFiles (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:57676:9)
    at Object.exports.fromCallback.exports.unique.exports.contain.module.exports.updated (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:57680:5)
    at Function.exports.fromCallback.exports.unique.exports.contain.xfs.mkdir.exports.time.socket.once.socket.on.Object.keys.forEach.compile.necessary (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:93797:12)
    at Object.exports.fromCallback.exports.unique.exports.contain.Contracts.compile (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:50028:15)
    at /usr/local/lib/node_modules/truffle/build/cli.bundled.js:95195:17
    at /usr/local/lib/node_modules/truffle/build/cli.bundled.js:56218:26
    at FSReqWrap.oncomplete (fs.js:82:15)

how can I solve it?

gcc2ge commented 4 years ago

the project was builded by truffle v3.4.11. the error may caused by different truffle version. you can change truffle version to v3.4.11

segogt commented 4 years ago

the project was builded by truffle v3.4.11. the error may caused by different truffle version. you can change truffle version to v3.4.11

Thank you!