我正在尝试运行electron-rebuild sharp
以便可以在电子中使用尖锐的包。
我还需要nodemon包,当我安装了这两个包时,我收到以下错误:
electron-rebuild searching for .node file /home/derek/projects/fsevents-test/node_modules/fsevents/build/Release +3ms
electron-rebuild testing files [ '.deps', '.forge-meta', '.node', 'obj.target' ] +1ms
✖ Rebuild Failed
An unhandled error occurred inside electron-rebuild
Path must be a string. Received undefined
TypeError: Path must be a string. Received undefined
at assertPath (path.js:28:11)
at Object.resolve (path.js:1167:7)
at Rebuilder.<anonymous> (/home/derek/projects/realfood/node_modules/electron-rebuild/lib/src/rebuild.js:151:35)
at Generator.next (<anonymous>)
at fulfilled (/home/derek/projects/realfood/node_modules/electron-rebuild/lib/src/rebuild.js:4:58)
at <anonymous>
如果我再次运行该命令,则不会发生此错误,并且会重建包并且我可以使用它。
看起来这是 fsevents 要做的事情 - 我在 linux 上,所以不应该使用它。
知道我做错了什么吗?使用节点 8.1.2 和 npm 5.0.3