-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CircleCI. Closes GH-31 #32
Conversation
Getting this mysterious error from browserify on CircleCI - never seen this locally..
|
http://stackoverflow.com/questions/21685044/browserify-uncaught-error-cannot-find-module-in-bundle-js says this occurs when using a jison parser, sure enough https://github.com/rom1504/node-mojangson uses jison, but only as a dev dependency? Maybe its something else. The stackoverflow user says they fixed it in their case by "replacing that mindfuck exports part with a exports.parser = parser;" if (typeof require !== 'undefined' && typeof exports !== 'undefined') {
exports.parser = parser;
exports.Parser = parser.Parser;
exports.parse = function () {
return parser.parse.apply(parser, arguments);
};
exports.main = function commonjsMain(args){
if(!args[1]){
console.log("Usage: "+args[0]+" FILE");
process.exit(1)
}
var source=require("fs").readFileSync(require("path").normalize(args[1]),"utf8");
return exports.parser.parse(source)
};
if (typeof module !== 'undefined' && require.main === module) {
exports.main(process.argv.slice(1));
}
} and its using https://github.com/deathcap/jison/commits/modulemain which has deathcap/jison@83a3813.. for PrismarineJS/node-mojangson#4 Disable unused moduleMain code for browserify compatibility |
There are differences in |
@deathcap I think I found your problem, the published grammar.js seems to still contain the cli thingy. republishing it in a bit. |
@rom1504 cool thanks. reproduced locally was about to track it down =) |
fixed in mojangson 0.2.3 |
Updated and verified circleci is using mojangson 0.2.3 which has the main stub as expected: exports.main = function (){}; so I think the problem with mojagson is fixed. Still getting this error though - maybe another problematic unbrowserifiable module:
ill need to isolate further.. |
#31