libp2p / js-peer-info

libp2p Peer abstraction Node.js implementation
https://libp2p.io
MIT License
37 stars 28 forks source link

npm ignore, readme and vendor forge #10

Closed daviddias closed 8 years ago

daviddias commented 8 years ago

@dignifiedquire getting a weird error only on PhantomJS. Thoughts?

07 04 2016 20:04:40.805:INFO [PhantomJS 1.9.8 (Mac OS X 0.0.0)]: Connected on socket /#GBB6R-4b3sJGWx54AAAB with id 36302288
PhantomJS 1.9.8 (Mac OS X 0.0.0) ERROR
  SyntaxError: Parse error
  at /Users/david/code/protocol-labs/_libp2p/js/js-peer-info/test/index.spec.js:20710

  7 passing (29s)

[20:04:40] 'karma' errored after 29 s
[20:04:40] Error: Some tests are failing
    at formatError (/Users/david/code/protocol-labs/_libp2p/js/js-peer-info/node_modules/dignified.js/src/gulp-log.js:24:10)
    at Gulp.<anonymous> (/Users/david/code/protocol-labs/_libp2p/js/js-peer-info/node_modules/dignified.js/src/gulp-log.js:50:17)
    at emitOne (events.js:82:20)
    at Gulp.emit (events.js:169:7)
    at Gulp.Orchestrator._emitTaskDone (/Users/david/code/protocol-labs/_libp2p/js/js-peer-info/node_modules/orchestrator/index.js:264:8)
    at /Users/david/code/protocol-labs/_libp2p/js/js-peer-info/node_modules/orchestrator/index.js:275:23
    at finish (/Users/david/code/protocol-labs/_libp2p/js/js-peer-info/node_modules/orchestrator/lib/runTask.js:21:8)
    at cb (/Users/david/code/protocol-labs/_libp2p/js/js-peer-info/node_modules/orchestrator/lib/runTask.js:29:3)
daviddias commented 8 years ago

ok, so PhantomJS error was because I had a older version. Now I have a new error:

AAB with id 32204495
PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR
  SyntaxError: Unexpected token 'const'
  at /Users/david/code/protocol-labs/_libp2p/js/js-peer-info/test/index.spec.js:20708
dignifiedquire commented 8 years ago

SyntaxError: Unexpected token 'const'

This means that one of your dependencies is not being properly transpiled into ES5. Try

daviddias commented 8 years ago

Found the issue. Seems that peer-id didn't have jsnext:main defined and so this module thought it was using already the transpiled version (and so, not transpiling it)

The new issue is that js-peer-id also breaks on PhantomJS with:

12 04 2016 21:06:03.040:INFO [launcher]: Starting browser PhantomJS

12 04 2016 21:07:03.039:WARN [launcher]: PhantomJS have not captured in 60000 ms, killing.
12 04 2016 21:07:05.040:WARN [launcher]: PhantomJS was not killed in 2000 ms, sending SIGKILL.
12 04 2016 21:07:07.045:WARN [launcher]: PhantomJS was not killed by SIGKILL in 2000 ms, continuing.

https://github.com/diasdavid/js-peer-id/pull/17

daviddias commented 8 years ago

Now yes :) As a reference (for the lolz) -> https://github.com/diasdavid/js-peer-id/pull/17#issuecomment-209088074