question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

apiClient is not created, and can't fetch plans from API

See original GitHub issue

We are trying to update from Typewriter 7.4.1 to 8.0.3.

I’m trying to regenerate our analytics with the new Public API Token. After running yarn typewriter init, I’m able to go through the steps just fine with no issue. On completion though no client is created (docs)

Additionally, when I run yarn typewriter or yarn typewriter build, after doing yarn typewriter init. I receive the following error Error: Unable to fetch Tracking Plan from local cache or API.

I’m not sure why I get this error, because when I do yarn typewriter init I’m able to see all of the tracking plans and select the one I want.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
oscbcommented, Aug 23, 2022

@andreiho I think your assumption is spot on. I can already see that we missed the page size from being bigger than 1 for starters. Doing some tests right now

1reaction
dncrewscommented, Aug 20, 2022

I’m getting the same errors. Here is some more information:

  • OS: macOS Monterey
  • Chip: M1
  • node: v14.20.0
  • analytics-node: v6.2.0
  • typewriter: v8.0.3

If you do NOT have a ~/.typewriter file and run typewriter init

Outcomes

You get this output

? Save these settings? Yes
    TypeError: Cannot read property 'method' of undefined
error Command failed with exit code 1.

You get these files:

  1. ~/.typewriter (if you ask it to save it)
  2. ./typewriter.yml (the id starts with tp_)
  3. … nothing else

If you DO have a ~/.typewriter file and run typewriter init

Outcomes

You get this output

? Save these settings? Yes
✨  Done in 101.02s.

You get these files

  1. ./typewriter.yml
  2. … nothing else

If you have a typewriter.yml file and run typewriter

Outcomes

You get the following output

Loading tracking plans... !
    Error: Unable to fetch Tracking Plan from local cache or API
error Command failed with exit code 1.

You get the following files

  1. … none

If I downgrade to 7.x, everything works correctly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to use Add REST API client · Issue #7 - GitHub
Steps to reproduce: Create VS 2015 ASP.NET Core API app and add swagger with its UI and configure it; Run the app and...
Read more >
JavaScript API client FAQ - Algolia
Find answers to common issues with the JavaScript API client. ... Why do I get “'createHmac' is not exported” error when bundling.
Read more >
Error Messages | Maps JavaScript API - Google Developers
Your API project may have been deleted from the Cloud Console. Please check the project for which you generated the API key that's...
Read more >
Web API implementation - Best practices for cloud applications
Learn about best practices for implementing a web API and publishing it to make it available to client applications.
Read more >
Creating API requests and handling responses - Google Cloud
This document describes how to construct API requests and handle API responses from the Compute Engine API. It covers how to: Construct a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found