browserify / wzrd.in

browserify as a service.
http://wzrd.in
MIT License
637 stars 96 forks source link

Cannot require("foo/bar"), wizrd.in does not handle it #26

Closed Raynos closed 11 years ago

Raynos commented 11 years ago

When I try to depend on a module that requires requiring a sub file the loading from the browserify CDN fails.

See https://github.com/maxogden/requirebin/issues/16

jfhbrook commented 11 years ago

How does browserify handle this? Can you run browserify-cdn locally and give me an idea of the output? Or, at the very least, a real-world example I can use to test?

Raynos commented 11 years ago

request body:

{"options":{"debug":true},"dependencies":{"jsonml-stringify/dom":"latest"}}

response body:

---FLAGRANT SYSTEM ERROR---

--- error #0: ---

Error: "npm registry returned status code 404"

body: { error: 'version not found: dom' }

------

Get ahold of @jesusabdullah on freenode, twitter or github
with the ENTIRETY of the contents of this message, and he can
try to help you out.

Have a nice day!
Raynos commented 11 years ago

I ran this code in requirebin.com

// require something
var jsonml = require("jsonml-stringify/dom")

var form = ["form", {
  method: "post",
  action: "http://mocky.io/"
}, [
  ["input", {
    name: "statuscode",
    placeholder: "Status Code"
  }],
  ["input", {
    name: "location",
    placeholder: "Location"
  }],
  ["input", {
    name: "contenttype",
    placeholder: "Content Type"
  }],
  ["input", {
    name: "charset",
    placeholder: "Charset"
  }],
  ["input", {
    name: "headerNames[]",
    placeholder: "A header name"
  }],
  ["input", {
    name: "headerValues[]",
    placeholder: "A header value"
  }],
  ["input", {
    name: "body",
    placeholder: "A body"
  }],
  ["input", {
    type: "submit"
  }, "Submit form"]
]]

document.body.appendChild(jsonml(form))
jfhbrook commented 11 years ago

It's a encodeURIComponent issue, sounds like.

EDIT: I take that back, since obviously encoding URIs shouldn't be an issue with multibundle.

jfhbrook commented 11 years ago

Just fixed this. New tests pass, so I'm closing this until I hear otherwise.