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

npm install --save mapbox-gl error #5025

Closed
georgebutter opened this issue Jul 22, 2017 · 14 comments
Closed

npm install --save mapbox-gl error #5025

georgebutter opened this issue Jul 22, 2017 · 14 comments

Comments

@georgebutter
Copy link

Following the instructions from the documentation. I create a new directory, and cd into it and run the command npm install --save mapbox-gl.
This results in the following error:

npm ERR! addLocal Could not install /Users/user/Sites/fallenleaves/node_modules/mapbox-gl/src/style-spec

It also made an npm-debug.log file. Let me know if a gist of this would be helpful.

I have never experienced this sort of error before with npm so I did some digging and couldn't find anything helpful. Not sure if this is to do with my setup, mapbox or npm. Any help appreciated.

@ethanzxlee
Copy link

HI, there! I'm getting the similar error when trying to npm install --save mapbox-gl

This is what I got from the terminal:

npm WARN deprecated point-geometry@0.0.0: This module has moved: please install @mapbox/point-geometry instead
npm WARN deprecated vector-tile@1.3.0: This module has moved: please install @mapbox/vector-tile instead
npm ERR! code ENOLOCAL
npm ERR! Could not install from "node_modules/mapbox-gl/src/style-spec" as it does not contain a package.json file.

I've also attached the npm log file:
2017-07-22T03_48_30_719Z-debug copy.log.txt

😃

@georgebutter
Copy link
Author

georgebutter commented Jul 22, 2017

Yep, your log looks the same as mine! I have tried using sudo as well.

@ethanzxlee
Copy link

However it works if I install the previous version bynpm install --save mapbox-gl@0.38.0

@georgebutter
Copy link
Author

Brilliant, this version works for me also. Thank you very much! :)

@rbonillajr
Copy link

+1

@munawar-js
Copy link

Node: 8.1.4
NPM: 5.3.0

npm install react-mapbox-gl mapbox-gl --save

success: react-mapbox-gl@2.1.0
Failure: mapbox-gl


error log for mapbox-gl:

npm WARN deprecated point-geometry@0.0.0: This module has moved: please install @mapbox/point-geometry instead
npm WARN deprecated vector-tile@1.3.0: This module has moved: please install @mapbox/vector-tile instead
npm ERR! code ENOLOCAL
npm ERR! Could not install from "node_modules/mapbox-gl/src/style-spec" as it does not contain a package.json file.

npm install --save mapbox-gl@0.38.0 this also doen't work for me

npm WARN deprecated point-geometry@0.0.0: This module has moved: please install @mapbox/point-geometry instead
npm WARN deprecated vector-tile@1.3.0: This module has moved: please install @mapbox/vector-tile instead
npm WARN deprecated geojson-area@0.1.0: This module is now under the @mapbox namespace: install @mapbox/geojson-area instead
npm WARN react-mapbox-gl@2.1.0 requires a peer of mapbox-gl@^0.37.0 but none was installed.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: readable-stream@1.1.14 (node_modules/static-module/node_modules/duplexer2/node_modules/readable-stream):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, open '/Users/munawar/projects/mapbox/node_modules/.staging/readable-stream-eb4cb497/.npmignore'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: object-keys@0.4.0 (node_modules/static-module/node_modules/object-keys):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, open '/Users/munawar/projects/mapbox/node_modules/.staging/object-keys-a1bcf66d/foreach.js'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: core-js@2.4.1 (node_modules/call-matcher/node_modules/core-js):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, chmod '/Users/munawar/projects/mapbox/node_modules/.staging/core-js-15312b0c/index.js'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: escodegen@1.3.3 (node_modules/static-module/node_modules/escodegen):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, chmod '/Users/munawar/projects/mapbox/node_modules/.staging/escodegen-baa0747f/escodegen.js'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: espurify@1.7.0 (node_modules/espurify):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, open '/Users/munawar/projects/mapbox/node_modules/.staging/espurify-4afa6ce0/package.json'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: multi-stage-sourcemap@0.2.1 (node_modules/multi-stage-sourcemap):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: EEXIST: file already exists, mkdir '/Users/munawar/projects/mapbox/node_modules/.staging/multi-stage-sourcemap-bb8d69ea'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: File exists: /Users/munawar/projects/mapbox/node_modules/.staging/multi-stage-sourcemap-bb8d69ea
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: call-matcher@1.0.1 (node_modules/call-matcher):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, chmod '/Users/munawar/projects/mapbox/node_modules/.staging/call-matcher-ec889387/README.md'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: escodegen@0.0.28 (node_modules/static-eval/node_modules/escodegen):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: EEXIST: file already exists, mkdir '/Users/munawar/projects/mapbox/node_modules/.staging/escodegen-16caef36'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: File exists: /Users/munawar/projects/mapbox/node_modules/.staging/escodegen-16caef36
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: core-js@2.4.1 (node_modules/espurify/node_modules/core-js):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, chmod '/Users/munawar/projects/mapbox/node_modules/.staging/core-js-c21ee0d6/LICENSE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: object-inspect@0.4.0 (node_modules/object-inspect):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, utime '/Users/munawar/projects/mapbox/node_modules/.staging/object-inspect-858f79a1/LICENSE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: duplexer2@0.0.2 (node_modules/static-module/node_modules/duplexer2):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, utime '/Users/munawar/projects/mapbox/node_modules/.staging/duplexer2-6dc1c2d1/.npmignore'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: falafel@2.1.0 (node_modules/falafel):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, utime '/Users/munawar/projects/mapbox/node_modules/.staging/falafel-75f0e757/.npmignore'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: estraverse@1.5.1 (node_modules/static-module/node_modules/estraverse):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, utime '/Users/munawar/projects/mapbox/node_modules/.staging/estraverse-091ec814/package.json'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: resolve-protobuf-schema@2.0.0 (node_modules/resolve-protobuf-schema):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, utime '/Users/munawar/projects/mapbox/node_modules/.staging/resolve-protobuf-schema-eadae3da/.npmignore'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: readable-stream@1.0.34 (node_modules/static-module/node_modules/readable-stream):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, utime '/Users/munawar/projects/mapbox/node_modules/.staging/readable-stream-54c06616/writable.js'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: esutils@1.0.0 (node_modules/static-module/node_modules/esutils):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, utime '/Users/munawar/projects/mapbox/node_modules/.staging/esutils-9df58bf8/lib/utils.js'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: minimist@1.2.0 (node_modules/quote-stream/node_modules/minimist):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, utime '/Users/munawar/projects/mapbox/node_modules/.staging/minimist-94ab2698/test/all_bool.js'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: acorn@4.0.13 (node_modules/unassertify/node_modules/acorn):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, utime '/Users/munawar/projects/mapbox/node_modules/.staging/acorn-771b6bb6/.npmignore'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: source-map@0.1.43 (node_modules/static-module/node_modules/source-map):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, open '/Users/munawar/projects/mapbox/node_modules/.staging/source-map-88e333b0/test/source-map/test-util.js'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: static-module@1.4.0 (node_modules/static-module):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, chmod '/Users/munawar/projects/mapbox/node_modules/.staging/static-module-62c193af/example/brfs/x.txt'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: protocol-buffers-schema@2.2.0 (node_modules/protocol-buffers-schema):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, utime '/Users/munawar/projects/mapbox/node_modules/.staging/protocol-buffers-schema-2e210fe1/test/fixtures/basic.json'

npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to https://registry.npmjs.org/pbf/-/pbf-1.3.7.tgz failed, reason: getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:443
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'

@ArnaudWeyts
Copy link

Can confirm 0.39 doesn't seem to work. Tried upgrading from 0.38 but getting the same error with yarn:
error "/Users/arnaud/dev/rideaway-frontend-v2/src/style-spec" doesn't exist.

@lukedesu
Copy link

SenseLuos-MacBook-Pro:client senseluo$ yarn upgrade-interactive
yarn upgrade-interactive v0.27.5
warning ../../../../package.json: No license field
info Color legend :
 "<red>"    : Patch Update Backward-compatible bug fixes
 "<yellow>" : Minor Update backward-compatibles features
? Choose which packages to update.
? Choose which packages to update. mapbox-gl@0.39.0
info Installing "dependencies"...
[1/4] Resolving packages...
Done in 4.62s.

v0.39.0 will leadyarn upgrade-interactive fail.

@radeno
Copy link

radeno commented Jul 23, 2017

Same issue here.

Maybe problem with path in package.json dependency for style-spec
https://github.com/mapbox/mapbox-gl-js/blob/master/package.json#L17 same in https://github.com/mapbox/mapbox-gl-js/blob/master/package.json#L44

NPM doesn't define current path without ./ then when is ./ isn't defined it could find in working directory.
https://docs.npmjs.com/files/package.json#local-paths

@jasonbarry
Copy link
Contributor

Same with yarn. Can't add or upgrade to the latest version of mapbox-gl

@jfirebaugh
Copy link
Contributor

Thanks everyone. We are aware of the issue. No need for further +1s.

rueckstiess added a commit to mongodb-js/compass that referenced this issue Jul 24, 2017
0.39.0 was broken at the time of building this, see mapbox/mapbox-gl-js#5025.
@jfirebaugh jfirebaugh marked this as a duplicate of #5032 Jul 24, 2017
@jfirebaugh
Copy link
Contributor

Fixed in 0.39.1.

@amirmatin
Copy link

@jfirebaugh Hi , I am using version 0.40.1 and still seeing the same issue when trying to test the provided example, Have also tried 0.39.1, same issue
Is there a solution for this?
Is there any step involving some sort of compilation with android studio ?
Thanks
Amir

@OlatunjiGab
Copy link

hello guys 'import mapboxgl from 'mapbox-gl/dist/mapbox-gl.js' do not work for me. See its error
screen shot 2018-11-30 at 11 03 10 Is there any solution to 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