【发布时间】:2018-08-08 02:12:28
【问题描述】:
由于某种原因 truffle 无法识别构造函数大小的变化
我尝试过的事情
1) 卸载松露并重新安装 2)删除build文件夹并重新编译
当我运行测试时它会抱怨但仍然运行测试
(node:97628) UnhandledPromiseRejectionWarning: Error: Factory contract constructor expected 3 arguments, received 2
at /usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-contract/contract.js:390:1
at new Promise (<anonymous>)
at /usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-contract/contract.js:374:1
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:160:7)
(node:97628) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:97628) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
第二次运行测试时,truffle 崩溃了,所以我必须在运行一个测试后重新启动 truffle。
Error: Factory contract constructor expected 3 arguments, received 2
at /usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-contract/contract.js:390:1
at new Promise (<anonymous>)
at /usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-contract/contract.js:374:1
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:160:7)
【问题讨论】: