Closed daslicht closed 10 years ago
What's the error that goes with that 500? Check the console, and the text that appears in your browser when you attempt to load that file.
i haven't seen any further infos there :/ I keep trying or try to find an alternative lib, thank you !
Attempting to browserify it on windows I get:
Error: module "./win32/x64/bson" not found from "C:\\Users\\forbes.lindesay\\Documents\\GitHub\\!temp\\node_modules\\objectid\\node_modules\\bson\\ext\\index.js"
It looks like ObjectID is depending on an old version of bson (0.1.9). In order for bson to support browserify, you must use bson V0.2.5 or greater.
Hm I just get this in my browser console:
GET http://localhost:3000/js/jsentry.js 500 (Internal Server Error)
here is my jsentry :
var objectid = require('objectid');
and I am using it like this:
app.use('/js/jsentry.js', browserify('./jsentry.js'));
But I dont get any error in my server console ?
Where do you see that error , please?
I get it when I use the browserify command line. Try opening http://localhost:3000/js/jsentry.js in your web browser? Browserify-middleware will just forward the error to whatever express error handling you have, so it's possible you're silencing the errors in there.
aha ! In the browser the error is shown correcly : Error: module "./win32/x64/bson" not found from "/Users/daslicht/node/e4hbs/node_modules/objectid/node_modules/bson/ext/index.js"
thank you !
no problem. It's frustrating that the browser doesn't show the error in its console.
https://github.com/agilemd/objectid/blob/master/index.js
? When I try to require this package I just get a 500
any idea?