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

dependency list #828

Closed
pnorman opened this issue Nov 13, 2014 · 15 comments
Closed

dependency list #828

pnorman opened this issue Nov 13, 2014 · 15 comments
Assignees

Comments

@pnorman
Copy link

pnorman commented Nov 13, 2014

The documentation does not contain a dependency list. It would be useful.

I had to install the glew headers (libglew-dev on debian-based systems), but I don't know what other requirements there are, other than a C compiler.

@pnorman
Copy link
Author

pnorman commented Nov 13, 2014

browserify is another dependency missing. Although I installed it independently, should it be added to the npm packaging info?

@tmcw
Copy link
Contributor

tmcw commented Nov 17, 2014

browserify is a devDependency of this package, it is already in the package.json and works quite well for me.

@pnorman
Copy link
Author

pnorman commented Nov 17, 2014

There are multiple errors intertwined, so that's why I thought browserify was an issue - here's what I got after wiping out node_modules and not manually installing glew.h. The latter results in errors then an optional dep failure

> gl@0.0.4 install /data/mapquest/vector_tiles/mapbox-gl-js/node_modules/gl
> node-gyp rebuild

make: Entering directory `/data/mapquest/vector_tiles/mapbox-gl-js/node_modules/gl/build'
  CXX(target) Release/obj.target/webgl/src/bindings.o
In file included from ../src/bindings.cc:17:0:
../src/arch_wrapper.h:32:21: fatal error: GL/glew.h: No such file or directory
 #include <GL/glew.h>
                     ^
compilation terminated.
make: *** [Release/obj.target/webgl/src/bindings.o] Error 1
make: Leaving directory `/data/mapquest/vector_tiles/mapbox-gl-js/node_modules/gl/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/data/mapquest/stdbase_devtools/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 2.6.32-431.20.3.el6.x86_64
gyp ERR! command "node" "/data/mapquest/stdbase_devtools/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /data/mapquest/vector_tiles/mapbox-gl-js/node_modules/gl
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm WARN optional dep failed, continuing gl@0.0.4

> mapbox-gl@0.4.2 prepublish /data/mapquest/vector_tiles/mapbox-gl-js
> npm run build && npm run production


> mapbox-gl@0.4.2 build /data/mapquest/vector_tiles/mapbox-gl-js
> browserify -d js/mapbox-gl.js > dist/mapbox-gl-dev.js


module.js:340
    throw err;
          ^
Error: Cannot find module 'mapbox-glsl-optimizer'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/data/mapquest/vector_tiles/mapbox-gl-js/node_modules/glify/index.js:5:12)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)

npm ERR! mapbox-gl@0.4.2 build: `browserify -d js/mapbox-gl.js > dist/mapbox-gl-dev.js`
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the mapbox-gl@0.4.2 build script.
npm ERR! This is most likely a problem with the mapbox-gl package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     browserify -d js/mapbox-gl.js > dist/mapbox-gl-dev.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls mapbox-gl
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 2.6.32-431.20.3.el6.x86_64
npm ERR! command "/data/mapquest/stdbase_devtools/bin/node" "/data/mapquest/stdbase_devtools/bin/npm" "run" "build"
npm ERR! cwd /data/mapquest/vector_tiles/mapbox-gl-js
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /data/mapquest/vector_tiles/mapbox-gl-js/npm-debug.log
npm ERR! not ok code 0

npm ERR! mapbox-gl@0.4.2 prepublish: `npm run build && npm run production`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mapbox-gl@0.4.2 prepublish script.
npm ERR! This is most likely a problem with the mapbox-gl package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run build && npm run production
npm ERR! You can get their info via:
npm ERR!     npm owner ls mapbox-gl
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 2.6.32-431.20.3.el6.x86_64
npm ERR! command "/data/mapquest/stdbase_devtools/bin/node" "/data/mapquest/stdbase_devtools/bin/npm" "install"
npm ERR! cwd /data/mapquest/vector_tiles/mapbox-gl-js
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /data/mapquest/vector_tiles/mapbox-gl-js/npm-debug.log
npm ERR! not ok code 0

if I

@tristen
Copy link
Member

tristen commented Mar 5, 2015

@pnorman is this still an issue? npm install should cover all deps from the looks of it.

@jfirebaugh
Copy link
Contributor

There are no additional dependencies for production use. However, to run the headless rendering tests, libglew-dev and imagemagick are required.

@pnorman
Copy link
Author

pnorman commented Mar 5, 2015

@pnorman is this still an issue? npm install should cover all deps from the looks of it.

I tested and npm install && npm start now works on Ubuntu 14.04 with only git, npm and nodejs-legacy installed.

However, to run the headless rendering tests, libglew-dev and imagemagick are required.

On the same VM I tried npm test with git, npm, nodejs-legacy, libglew-dev, imagemagick, and pastebinit (to get the text out of the vm) installed.

I got the error


> mapbox-gl@0.7.0 test /home/pnorman/mapbox-gl-js
> npm run lint && tape test/js/*/*.js


> mapbox-gl@0.7.0 lint /home/pnorman/mapbox-gl-js
> eslint js test


module.js:340
    throw err;
          ^
Error: Cannot find module 'gl'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/home/pnorman/mapbox-gl-js/js/util/canvas.js:6:10)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
npm ERR! weird error 8
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! not ok code 0

Edit: For completeness I checked npm run cov and it also has a Cannot find module 'gl' error

@jfirebaugh
Copy link
Contributor

@pnorman You'll need to rerun npm install after installing libglew-dev.

@pnorman
Copy link
Author

pnorman commented Mar 6, 2015

@pnorman You'll need to rerun npm install after installing libglew-dev.

Still failing.

Full script, starting from a clone of the clean 14.04 virtualbox VM I keep

sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get --no-install-recommends -y install git npm nodejs-legacy libglew-dev imagemagik pastebinit # wait...
git clone http://github.com/mapbox/mapbox-gl-js.git
cd mapbox-gl-js
npm install # wait...
npm test

This produces the error above.

@jfirebaugh
Copy link
Contributor

@pnorman Can you gist the output?

@pnorman
Copy link
Author

pnorman commented Mar 6, 2015

Which output? The output of npm test is above

@jfirebaugh
Copy link
Contributor

Of the entire sequence of commands.

@pnorman
Copy link
Author

pnorman commented Mar 6, 2015

https://gist.github.com/pnorman/debf8327f8e753f916de has logs, except for the initial update and upgrade

@jfirebaugh
Copy link
Contributor

From npm_install.log:

gyp ERR! stack Error: not found: make

Is make really not installed?

@pnorman
Copy link
Author

pnorman commented Mar 6, 2015

make is not a dependency of libglew-dev, imagemagick, or npm - nor is it part of a stock Ubuntu install.

There's a few other optional dependencies which have failed too.

@Jinnified
Copy link

so, did you find a solution for this?

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

6 participants