Skip to content

Instantly share code, notes, and snippets.

@jfhbrook
Created July 10, 2011 10:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jfhbrook/1074439 to your computer and use it in GitHub Desktop.
Save jfhbrook/1074439 to your computer and use it in GitHub Desktop.
This is what happens when you try to browserify jsdom.
<html>
<head>
<script type="text/javascript" src="/browserify.js"></script>
<script type="text/javascript">
var jsdom = require('jsdom');
</script>
</head>
<body>
trololol
</body>
</html>
var connect = require('connect');
var server = connect.createServer();
server.use(connect.static(__dirname));
server.use(require('browserify')({
mount : '/browserify.js',
require : 'jsdom',
}));
server.listen(4040);
console.log('Listening on 4040...');
josh@pidgey:~/jsdom-browserify$ node server.js
node.js:134
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: No wrapper for core module querystring
at Wrap.require (/home/josh/node_modules/browserify/lib/wrap.js:301:19)
at /home/josh/node_modules/browserify/lib/wrap.js:377:14
at Array.forEach (native)
at Wrap.require (/home/josh/node_modules/browserify/lib/wrap.js:376:27)
at /home/josh/node_modules/browserify/lib/wrap.js:377:14
at Array.forEach (native)
at Wrap.require (/home/josh/node_modules/browserify/lib/wrap.js:376:27)
at /home/josh/node_modules/browserify/index.js:79:7
at Object.<anonymous> (/home/josh/jsdom-browserify/server.js:5:32)
at Module._compile (module.js:402:26)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment