token undefined error
Open
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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