npm安装deasync引用出错(Could not locate the bindings file. Tried)解决办法
记录以下,这个问题困扰我很久,在网上找了错误信息, 基本都是npm rebuild。
但是npm rebuild 在我的项目上不起任何作用,甚至会引发 gyp一系列报错,我使用的是parcel构建的项目。感谢 gao_grace 这位大佬在 2017年的一篇文章,解决了我的问题。文末有传送门。
Error: Could not locate the bindings file. Tried:
→ /.../node_modules/deasync/build/deasync.node
→ /.../node_modules/deasync/build/Debug/deasync.node
→ /.../node_modules/deasync/build/Release/deasync.node
→ /.../node_modules/deasync/out/Debug/deasync.node
→ /.../node_modules/deasync/Debug/deasync.node
大意就是deasync找不到二进制文件deasync.node,上网上查了一下,让我更新node-gyp。
npm uninstall deasync
npm install deasync
先将 deasync 全部移除,然后重新 install
我估计可能使用为deasync的文件有缺失,所导致的。
如果运行之后没有效果,请试用 npm rebuild;
npm安装deasync引用出错。这是一个传送门