[build] Don't require running npm install within mapbox-gl-js submodule #7938
Conversation
3c38450
to
06008ec
Compare
06008ec
to
a9de278
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to fail with certain versions of npm. Locally, I'm using node 4.7.2 (the LTS version), which comes with npm 2.15.11. It installs the dependencies of the "@mapbox/mapbox-gl-test-suite": "file:mapbox-gl-js/test/integration"
module into node_modules/@mapbox/mapbox-gl-test-suite/node_modules
, which can't be found by the regular require
call. Bitrise seems to use node 4.7.3 (which also comes with 2.15.11 when downloaded from nodejs.org), but somehow it's using npm 4.1.2 instead. That npm version doesn't nest node_modules
folders anymore and just installs all dependencies in the node_modules
folder.
Additionally, I'm concerned that using the file:
syntax copies the test suite to the new installation location, meaning there are now two
instances of the test suite data, which might lead to confusion, and in particular makes modifying the tests hard.
Running |
Also requires |
What are the stack traces for those errors? As far as I can see, those dependencies are needed only if the |
For some reason, I can no longer replicate the issue with
|
Do you still get that if you update to npm 3 or later? |
@jfirebaugh I'm not sure we should rely on users upgrading their npm from the version that shipped with the stock installation. |
OK, I'll try different approaches. |
Don't get me wrong, I think there's a lot of value in removing the npm install for |
94a3c27#diff-e43a15f1b424c5893699e4225835cc9d should do for now -- next steps are to see if we can remove |
there's a new version of node-cmake that explicitly doesn't use npm and instead advises you to copy the cmake file into your project. I've encountered 2 issues switching to the new version: cjntaylor/node-cmake#17 cjntaylor/node-cmake#18 |
No description provided.