松露服务抛出下面提到的错误?
truffle serve throws the below mentioned error?
:\blockchain\truffle\demo\mortgage-blockchain-demo>truffle serve
erving static assets in .\build on port 8080...
ebuilding...
:\Users\Mabel\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:220
48
return (new fsevents(path)).on('fsevent', callback).start();
^
ypeError: fsevents is not a constructor
at createFSEventsInstance (C:\Users\Mabel\AppData\Roaming\npm\node_modules\t
uffle\build\cli.bundled.js:220548:11)
at setFSEventsListener (C:\Users\Mabel\AppData\Roaming\npm\node_modules\truf
le\build\cli.bundled.js:220602:16)
at FSWatcher.FsEventsHandler._watchWithFsEvents (C:\Users\Mabel\AppData\Roam
ng\npm\node_modules\truffle\build\cli.bundled.js:220766:16)
at FSWatcher.<anonymous> (C:\Users\Mabel\AppData\Roaming\npm\node_modules\tr
ffle\build\cli.bundled.js:220900:25)
at LOOP (fs.js:1758:14)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
请帮助我解决问题。我 运行 在 windows 7 机器上。
正在尝试设置以太坊松露。
不使用时禁用 FsEvents
:
C:\Users\UserName\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js
// 如果 (!FsEventsHandler.canUse())
opts.useFsEvents = false;
步骤:
truffle compile && truffle build && truffle migrate && truffle serve
只需 remove/off //Users/**abc/projectFolder/node_modules/chokidar/lib/fsevents-handler.js
中的以下代码
函数 createFSEventsInstance(路径,回调){
//return (new fsevents(path)).on('fsevent', callback).start();
}
场景:
using create-react-app
/Users/**abc/projectFolder/node_modules/chokidar/lib/fsevents-handler.js
解法:
Temporarily //return (new fsevents(path)).on('fsevent', callback).start();
:\blockchain\truffle\demo\mortgage-blockchain-demo>truffle serve erving static assets in .\build on port 8080... ebuilding... :\Users\Mabel\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:220 48 return (new fsevents(path)).on('fsevent', callback).start(); ^ ypeError: fsevents is not a constructor at createFSEventsInstance (C:\Users\Mabel\AppData\Roaming\npm\node_modules\t uffle\build\cli.bundled.js:220548:11) at setFSEventsListener (C:\Users\Mabel\AppData\Roaming\npm\node_modules\truf le\build\cli.bundled.js:220602:16) at FSWatcher.FsEventsHandler._watchWithFsEvents (C:\Users\Mabel\AppData\Roam ng\npm\node_modules\truffle\build\cli.bundled.js:220766:16) at FSWatcher.<anonymous> (C:\Users\Mabel\AppData\Roaming\npm\node_modules\tr ffle\build\cli.bundled.js:220900:25) at LOOP (fs.js:1758:14) at _combinedTickCallback (internal/process/next_tick.js:67:7) at process._tickCallback (internal/process/next_tick.js:98:9)
请帮助我解决问题。我 运行 在 windows 7 机器上。
正在尝试设置以太坊松露。
不使用时禁用 FsEvents
:
C:\Users\UserName\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js
// 如果 (!FsEventsHandler.canUse())
opts.useFsEvents = false;
步骤:
truffle compile && truffle build && truffle migrate && truffle serve
只需 remove/off //Users/**abc/projectFolder/node_modules/chokidar/lib/fsevents-handler.js
中的以下代码函数 createFSEventsInstance(路径,回调){
//return (new fsevents(path)).on('fsevent', callback).start();
}
场景:
using create-react-app
/Users/**abc/projectFolder/node_modules/chokidar/lib/fsevents-handler.js
解法:
Temporarily //return (new fsevents(path)).on('fsevent', callback).start();