mapbox / mapbox/mvtview

token undefined error

Open
#11 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
49
Forks
10
PR merge metrics
No merged PRs in 30d

Description

I'm trying to read a .mvt tile generated from https://github.com/tobinbradley/dirt-simple-postgis-http-api

Getting this error:

$ mvtview 14_11761_6907.mvt
/usr/local/lib/node_modules/@mapbox/mvtview/cli.js:17
if (!token.includes('pk.')) {
           ^

TypeError: Cannot read property 'includes' of undefined
    at Object.<anonymous> (/usr/local/lib/node_modules/@mapbox/mvtview/cli.js:17:12)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
    at internal/main/run_main_module.js:17:47

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The report points to cli.js:17 and the mvtview command. Reproduce the failure with mvtview 14_11761_6907.mvt, then inspect how the token is obtained before the includes call. Clarify the expected behavior for opening this tile without a token, and verify the command no longer raises the reported TypeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.