plus3network / fit

FIT Parser for Ant Fit devices
MIT License
11 stars 4 forks source link

Broken lib requirement? #1

Closed entropitor closed 10 years ago

entropitor commented 10 years ago

There seems to be going something wrong when I require('fit');, I am using javascript, not sure if that matters.

Error log:

Error: Cannot find module './lib/main'
  at Function.Module._resolveFilename (module.js:338:15)
  at Function.Module._load (module.js:280:25)
  at Module.require (module.js:364:17)
  at require (module.js:380:17)
  at Object.<anonymous> (~/Desktop/fit/node_modules/fit/index.js:2:18)
  at Module._compile (module.js:456:26)
  at Object.Module._extensions..js (module.js:474:10)
  at Module.load (module.js:356:32)
  at Function.Module._load (module.js:312:12)
  at Module.require (module.js:364:17)
  at require (module.js:380:17)
  at Object.<anonymous> (~/Desktop/fit/index.js:2:11)
  at Module._compile (module.js:456:26)
  at Object.Module._extensions..js (module.js:474:10)
  at Module.load (module.js:356:32)
  at Function.Module._load (module.js:312:12)
  at Function.Module.runMain (module.js:497:10)
  at startup (node.js:119:16)
  at node.js:902:3
stephenlacy commented 10 years ago

It has to do with the missing coffeescript/register param. I should be fixing it shortly.

entropitor commented 10 years ago

Ok, thank you very much. And thank you for the quick response!

stephenlacy commented 10 years ago

Does #2 work for you?

yocontra commented 10 years ago

Fixed

entropitor commented 10 years ago

I'm actually having trouble installing it from npm now.

npm http GET https://registry.npmjs.org/fit
npm http 304 https://registry.npmjs.org/fit
npm http GET https://registry.npmjs.org/coffee-script
npm http GET https://registry.npmjs.org/java
npm http 304 https://registry.npmjs.org/coffee-script
npm http 304 https://registry.npmjs.org/java
npm http GET https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/find-java-home/0.0.6
npm http 304 https://registry.npmjs.org/find-java-home/0.0.6
npm http GET https://registry.npmjs.org/find-in-path
npm http 304 https://registry.npmjs.org/find-in-path

> java@0.3.1 install /home/jens/Desktop/fit/node_modules/fit/node_modules/java
> node-gyp rebuild

Traceback (most recent call last):
  File "/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 18, in <module>
    sys.exit(gyp.script_main())
AttributeError: 'module' object has no attribute 'script_main'
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:337:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.11.0-18-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/jens/Desktop/fit/node_modules/fit/node_modules/java
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok 
npm ERR! java@0.3.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the java@0.3.1 install script.
npm ERR! This is most likely a problem with the java package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls java
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.11.0-18-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "fit"
npm ERR! cwd /home/jens/Desktop/fit
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/jens/Desktop/fit/npm-debug.log
npm ERR! not ok code 0
stephenlacy commented 10 years ago

https://www.npmjs.org/package/java

Check where your JDK is installed, mine is /user/lib/jvm/ Make sure that your terminal has the JAVA_HOME and java jdk set to the correct folder.

entropitor commented 10 years ago

Thank you very much for your help. I don't know what exactly did it but I played around with it a little and it started working :)

And thank you for the quick fix!