我正在做电子项目。该项目需要将文件从pc复制到usb驱动器。我需要能够将文件和文件夹复制到destenetion usb驱动器。并知道驱动器上的可用空间大小。
我尝试了不同的npm,比如usb npm和im,得到了这个错误:
C:\Users\goorlavi1\Documents\pc-transfer>npm install --save usb
> usb@1.2.0 install C:\Users\goorlavi1\Documents\pc-transfer\node_modules\usb
> node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download: https://github.com/tessel/node-usb/releases/download/1.2.0/usb_bindings-v1.2.0-node-v51-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for usb@1.2.0 and node@7.2.1 (node-v51 ABI) (falling back to source compile with node-gyp)它太长了,不能在这里过去。
如果有可能提供示例代码,它将是伟大的谢谢!
发布于 2017-11-03 05:13:43
所有这一切(通常)意味着有一些C++模块尚未针对您的机器进行编译。Node-pre-gyp将尝试将C++编译为Node。但是,您的机器上需要一个C++编译器才能做到这一点。例如,如果你在mac上运行,它很可能只在gcc/g++上运行,如果你在linux机器上,你将不得不安装gcc/g++,如果你在windows上,你将不得不找一个替代的编译器。
我假设你是在windows上运行的,我很抱歉,因为我还没有找到一个好的windows的C++编译器,可以和pre-gyp一起工作,但我认为你应该不会有太多的问题。
https://stackoverflow.com/questions/47084615
复制相似问题