Skip to content
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

esprima-six module is not reachable anymore #120

Open
andrewtheone opened this issue Dec 18, 2015 · 8 comments
Open

esprima-six module is not reachable anymore #120

andrewtheone opened this issue Dec 18, 2015 · 8 comments

Comments

@andrewtheone
Copy link

I try to install ndarray branch, because of the "plugins" and transparency, and i get an error saying "esprima-six" is not maintend anymore. Any ideas?

@max-mapper
Copy link
Owner

Bah sorry, the author unpublished it from NPM recently (a really bad practice as it breaks code like this) https://www.npmjs.com/package/esprima-six, https://twitter.com/mattdesl/status/676897307380576257. It's possible this module might work instead but I'm not sure https://www.npmjs.com/package/esprima

@andrewtheone
Copy link
Author

What i could find out is, voxel-engine is depending on voxel-shader which has a module which depends on awts which depended on esprima-six. if i download the voxel-engine github zip, remove the voxel-shader, npm install it, then download voxel-shader, put it in voxel-engine/node_modules, npm_install the voxel-shader then i want to browserify my index.js, and the browserify stops with an error: "undefined is not a function..." and pointing at aoshader.js in voxel-shader.

any idea how to make it work?

@max-mapper
Copy link
Owner

I just published this: https://www.npmjs.com/package/esprima-six-legacy, maybe try replacing 'esprima-six' in the awts package.json with 'esprima-six-legacy'?

@andrewtheone
Copy link
Author

thats gona be a long run i believe finding the right packages, i'll report back

@andrewtheone
Copy link
Author

so it finally builds with browserify, but then again, now i'm getting a more strange error when i visit index.html:

Uncaught Error: Error compiling vertex shader: ERROR: 0:18: '=' : global variable initializers must be constant expressions
createShader @ bundle.js:28004(anonymous function) @ bundle.js:27569ShaderPlugin.createAOShader @ bundle.js:27508ShaderPlugin.ginit @ bundle.js:27431EventEmitter.emit @ bundle.js:8485initGLNow @ bundle.js:18492EventEmitter.emit @ bundle.js:8467initGameShell @ bundle.js:19699
13bundle.js:27454 Uncaught Error: voxel-shader render() called before gl-init, shader=

index.js content:

var createGame = require('voxel-engine');
var game = createGame({});
var container = document.body;
game.appendTo(container);

@andrewtheone
Copy link
Author

all i wanted is having some half-transparent blocks.. that was roughly 12 hours ago, and sitting here without them, dissapointing

@max-mapper
Copy link
Owner

@andrewtheone sorry, this project has been inactive for a while so it seems some things are broken

@deathcap
Copy link
Collaborator

@andrewtheone I ran into both these problems and fixed them yesterday I believe:

voxel/voxel-shader#11 gl-shader: Error compling vertex shader: ERROR: 0:18: '=' : global variable initializers must be constant expressions
voxel/voxelmetaverse#60 nonexistent dependency (esprima-six unpublished)

(I too was surprised how a module could "spontaneously" break… unfortunately a weakness of NPM, where a dependency can be unpublished then break all dependent projects, not only voxel.js was affected: http://stackoverflow.com/questions/33608630/what-happened-to-the-esprima-six-npm-module - but it should be fixed now in the latest voxel-shader, voxel-decals, voxel-mesher, voxel-webview and gl-css3d 1.0.0. The global variable shader error was my fault though, appears that the code was illegal but previously accepted by browsers, either way, fixed now :)).

Can you try voxel-engine-stackgl 1.0.1, it has both these fixes (voxel-engine-stackgl replaces voxel-engine ndarray branch). Not sure if voxel-engine master branch is broken though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants