jackfranklin / pulldown

The minimal JavaScript package manager.
175 stars 7 forks source link

Error message while trying to pulldown query #90

Closed PDXIII closed 10 years ago

PDXIII commented 10 years ago

Hi!

Really like your module, but since today something is weird. When I tried pulldown jquery received this message:

SyntaxError: Unexpected token <
    at Object.parse (native)
    at Request._callback (/usr/local/lib/node_modules/pulldown/node_modules/pulldown-middle-man/lib/middleman.js:7:21)
    at Request.self.callback (/usr/local/lib/node_modules/pulldown/node_modules/pulldown-middle-man/node_modules/request/index.js:148:22)
    at Request.EventEmitter.emit (events.js:98:17)
    at Request.<anonymous> (/usr/local/lib/node_modules/pulldown/node_modules/pulldown-middle-man/node_modules/request/index.js:876:14)
    at Request.EventEmitter.emit (events.js:117:20)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/pulldown/node_modules/pulldown-middle-man/node_modules/request/index.js:827:12)
    at IncomingMessage.EventEmitter.emit (events.js:117:20)
    at _stream_readable.js:919:16
    at process._tickCallback (node.js:419:13)

I am on a MacBook Pro with Mavericks with node 0.10.28 and updated pulldown.

Best Regards, Pete

tgvashworth commented 10 years ago

Hey, thanks for reporting this. Looks like the API is crashing when you ask for a set, and therefore serving HTML. However, we shouldn't crash when we get it ;)

tgvashworth commented 10 years ago

Looks like this is because the CDNjs API format has changed.

PDXIII commented 10 years ago

Hurray! It’s not my fault \o/. I ain’t doing anything wrong!!!

jackfranklin commented 10 years ago

As Tom said, thanks @PDXIII for reporting this. Our error handling could be better here - hopefully #91 will help.

jackfranklin commented 10 years ago

@PDXIII so the problem as @phuu defined was down to the CDNJS format changing slightly and rather bizarrely.

I've opened a PR on cdnjs-transform which will fix that. Then we can release a new version of the CDNJS module and then the Pulldown API, and from there we should be back to working. My PR on this repo though should help with future API problems.

tgvashworth commented 10 years ago

boom

tgvashworth commented 10 years ago

Just released pulldown-api and pulldown jquery works for me again, so closing. Thanks for the report @PDXIII – let us know if you have any further trouble.