lwille / node-gphoto2

A Node.js wrapper for libgphoto2
MIT License
298 stars 91 forks source link

Lots of errors #76

Closed roowilliams closed 6 years ago

roowilliams commented 9 years ago

Hello,

I've managed with some success to communicate with camera's using this lib I can load settings and write settings, but I am now trying to move on to getting an image preview. I've tried to reference the example but I cannot get it to run.

Here's my install process:

npm install ghoto2

Get this error:

((which pkg-config && pkg-config libgphoto2) || (which dpkg && dpkg -s libgphoto2-2-dev) || (which brew && brew list libgphoto2) || (echo 'ERROR: libgphoto2 seems not to be installed.' 1>&2; exit 1)) && node-gyp rebuild

cd node_modules/gphoto2 npm install

awilliams:gphoto2 awilliams$ npm install

> gphoto2@0.1.7 preinstall /Users/awilliams/Development/node_modules/gphoto2
> ((which pkg-config && pkg-config libgphoto2) || (which dpkg && dpkg -s libgphoto2-2-dev) || (which brew && brew list libgphoto2) || (echo 'ERROR: libgphoto2 seems not to be installed.' 1>&2; exit 1)) && node-gyp rebuild

/usr/local/bin/brew
/usr/local/Cellar/libgphoto2/2.5.5/bin/gphoto2-config
/usr/local/Cellar/libgphoto2/2.5.5/bin/gphoto2-port-config
/usr/local/Cellar/libgphoto2/2.5.5/include/gphoto2/ (18 files)
/usr/local/Cellar/libgphoto2/2.5.5/lib/libgphoto2.6.dylib
/usr/local/Cellar/libgphoto2/2.5.5/lib/libgphoto2_port.10.dylib
/usr/local/Cellar/libgphoto2/2.5.5/lib/libgphoto2/ (65 files)
/usr/local/Cellar/libgphoto2/2.5.5/lib/libgphoto2_port/ (7 files)
/usr/local/Cellar/libgphoto2/2.5.5/lib/pkgconfig/ (2 files)
/usr/local/Cellar/libgphoto2/2.5.5/lib/udev/check-ptp-camera
/usr/local/Cellar/libgphoto2/2.5.5/lib/ (2 other files)
/usr/local/Cellar/libgphoto2/2.5.5/share/doc/ (54 files)
/usr/local/Cellar/libgphoto2/2.5.5/share/libgphoto2/ (6 files)
/usr/local/Cellar/libgphoto2/2.5.5/share/man/ (2 files)
  CXX(target) Release/obj.target/gphoto2/src/autodetect.o
  CXX(target) Release/obj.target/gphoto2/src/binding.o
  CXX(target) Release/obj.target/gphoto2/src/camera.o
  CXX(target) Release/obj.target/gphoto2/src/camera_helpers.o
  CXX(target) Release/obj.target/gphoto2/src/gphoto.o
  SOLINK_MODULE(target) Release/gphoto2.node
  SOLINK_MODULE(target) Release/gphoto2.node: Finished
/
> pre-commit@0.0.8 install /Users/awilliams/Development/node_modules/gphoto2/node_modules/pre-commit
> node install

\
> gphoto2@0.1.7 prepublish /Users/awilliams/Development/node_modules/gphoto2
> npm run cpplint

> gphoto2@0.1.7 cpplint /Users/awilliams/Development/node_modules/gphoto2
> util/cpplint.sh

async@0.2.10 node_modules/async

pre-commit@0.0.8 node_modules/pre-commit

should@1.3.0 node_modules/should

underscore@1.8.3 node_modules/underscore

coffee-script@1.9.2 node_modules/coffee-script

jade@0.28.2 node_modules/jade
├── commander@0.6.1
└── mkdirp@0.3.5

superagent@0.14.9 node_modules/superagent
├── methods@0.0.1
├── cookiejar@1.3.0
├── qs@0.6.5
├── debug@0.7.4
├── emitter-component@1.0.0
├── mime@1.2.5
└── formidable@1.0.9

mocha@1.21.5 node_modules/mocha
├── escape-string-regexp@1.0.2
├── growl@1.8.1
├── diff@1.0.8
├── commander@2.3.0
├── debug@2.0.0 (ms@0.6.2)
├── mkdirp@0.5.0 (minimist@0.0.8)
├── jade@0.26.3 (commander@0.6.1, mkdirp@0.3.0)
└── glob@3.2.3 (inherits@2.0.1, graceful-fs@2.0.3, minimatch@0.2.14)

sinon@1.14.1 node_modules/sinon
├── lolex@1.1.0
├── util@0.10.3 (inherits@2.0.1)
└── formatio@1.1.1 (samsam@1.1.2)

express@3.20.3 node_modules/express
├── basic-auth@1.0.0
├── merge-descriptors@1.0.0
├── utils-merge@1.0.0
├── cookie-signature@1.0.6
├── methods@1.1.1
├── fresh@0.2.4
├── cookie@0.1.2
├── escape-html@1.0.1
├── range-parser@1.0.2
├── content-type@1.0.1
├── vary@1.0.0
├── parseurl@1.3.0
├── content-disposition@0.5.0
├── commander@2.6.0
├── depd@1.0.1
├── debug@2.2.0 (ms@0.7.1)
├── etag@1.5.1 (crc@3.2.1)
├── proxy-addr@1.0.8 (forwarded@0.1.0, ipaddr.js@1.0.1)
├── mkdirp@0.5.0 (minimist@0.0.8)
├── send@0.12.3 (destroy@1.0.3, mime@1.3.4, ms@0.7.1, on-finished@2.2.1, etag@1.6.0)
└── connect@2.29.2 (pause@0.0.1, response-time@2.3.1, vhost@3.0.0, basic-auth-connect@1.0.0, on-headers@1.0.0, bytes@1.0.0, method-override@2.3.3, serve-static@1.9.3, cookie-parser@1.3.5, connect-timeout@1.6.2, qs@2.4.2, finalhandler@0.3.6, http-errors@1.3.1, morgan@1.5.3, serve-favicon@2.2.1, csurf@1.7.0, express-session@1.10.4, type-is@1.6.2, body-parser@1.12.4, errorhandler@1.3.6, compression@1.4.4, serve-index@1.6.4, multiparty@3.3.2)
awilliams:gphoto2 awilliams$ cd examples/
awilliams:examples awilliams$ ls
public      series.coffee   server.coffee
awilliams:examples awilliams$ sudo coffee server.coffee 
connect deprecated multipart: use parser (multiparty, busboy, formidable) npm module instead ../node_modules/express/node_modules/connect/lib/middleware/bodyParser.js:56:20
connect deprecated limit: Restrict request size at location of read ../node_modules/express/node_modules/connect/lib/middleware/multipart.js:86:15
found 1 cameras
loading Canon EOS 550D settings
{ main: 
   { label: 'Camera and Driver Configuration',
     type: 'window',
     children: 
      { actions: [Object],
        capturesettings: [Object],
        imgsettings: [Object],
        other: [Object],
        settings: [Object],
        status: [Object] } } }

Launch browser to localhost:1337, blank screen console reads: GET http://localhost:1337/js/superagent.js embedded:2 Uncaught ReferenceError: superagent is not defined

I have tried downloading superagent.js and add to public/js/, but that leads to an error with require...

Am I missing a step/lots of steps?

Thanks

Roo

roowilliams commented 9 years ago

Still not able to run the example but I have managed to build a node app that allows me to adjust camera settings, take and download photos to the file system. I'm going to attempt live preview today.

lwille commented 9 years ago

Just try npm install superagent. I think I removed it from the package.json for some reason, and the example code is not well-maintained :D

Sija commented 6 years ago

Issue seems resolved by manually installing superagent, for library updates see #94.