thomaschaaf / node-ftdi

FTDI bindings for Node.js
MIT License
45 stars 39 forks source link

unable to build on osx el capitan #30

Open michaelpalumbo opened 6 years ago

michaelpalumbo commented 6 years ago

Hi there, I can't install the package.

from "npm install ftdi -g"

I get:

ftdi@1.2.1 install /usr/local/lib/node_modules/ftdi node-gyp rebuild

CXX(target) Release/obj.target/ftdi/src/ftdi_device.o In file included from ../src/ftdi_device.cc:11: ../src/ftdi_device.h:7:10: fatal error: 'ftd2xx.h' file not found

include

     ^

1 error generated. make: *** [Release/obj.target/ftdi/src/ftdi_device.o] Error 1 gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23) gyp ERR! stack at ChildProcess.emit (events.js:180:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12) gyp ERR! System Darwin 15.3.0 gyp ERR! command "/usr/local/Cellar/node/9.11.1/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /usr/local/lib/node_modules/ftdi gyp ERR! node -v v9.11.1 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! ftdi@1.2.1 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the ftdi@1.2.1 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /Users/---------/.npm/_logs/2018-04-23T14_34_09_624Z-debug.log

doron-mil commented 6 years ago

I'm gettin the same problem. Can someone please help

beadon1 commented 6 years ago

the instructions for the FTDI install website are incomplete for MacOS. Use these.

Download the FTDI Drivers here : http://www.ftdichip.com/Drivers/D2XX.htm

The video installation instructions are broken, are require that you follow these steps additionally ( 6,7) :

  1. Open a Terminal window (Finder->Go->Utilities->Terminal).

  2. If the /usr/local/lib directory does not exist, create it: sudo mkdir /usr/local/lib

  3. if the /usr/local/include directory does not exist, create it: sudo mkdir /usr/local/include

  4. Copy the dylib file to /usr/local/lib: sudo cp Desktop/D2XX/libftd2xx.1.4.4.dylib /usr/local/lib/libftd2xx.1.4.4.dylib

  5. Make a symbolic link: sudo ln -sf /usr/local/lib/libftd2xx.1.4.4.dylib /usr/local/lib/libftd2xx.dylib

  6. Copy the D2XX include file: sudo cp ~/Desktop/D2XX/ftd2xx.h /usr/local/include/ftd2xx.h

  7. Copy the WinTypes include file: sudo cp ~/Desktop/D2XX/WinTypes.h /usr/local/include/WinTypes.h

  8. You have now successfully installed the D2XX library.