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

Error: Cannot infer name for schema #312

Open
alanfitzpatrick opened this issue Oct 3, 2023 · 1 comment
Open

Error: Cannot infer name for schema #312

alanfitzpatrick opened this issue Oct 3, 2023 · 1 comment

Comments

@alanfitzpatrick
Copy link

alanfitzpatrick commented Oct 3, 2023

Environment

$ node --version
v18.16.0
$ npm --version
9.5.1
$ tsc --version
Version 4.9.5

Steps

  1. Install typewriter
  2. Init Typewriter npx typewriter init
  3. Select a Tracking Plan with event names with a colon as the first special character e.g. something:something_something or something:something_something_something
  4. Summary should look like the following
    Configuration Summary:
 Name           Value         
 ────────────── ───────────── 
 Tracking Plans Something    
 Paths          src/analytics 
 Language       TypeScript    
 SDK            analytics-js  
  1. Run update npx typewriter --update

Expectation vs. Reality

Expected:
The generated library

Reality
Received the following error

Generating files... Error!
Error: Cannot infer name for schema something:something_something

Additional

  • If the colon is the second special character it works fine
  • Issue only appears if the colon is the first special character
@alanfitzpatrick
Copy link
Author

Looking further into this the issue appears to be related to quicktype and how it is interpretting the event name, it looks like it is seeing everything before the colon as a protocol, this seems to be a similar issue here - glideapps/quicktype#1113

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

1 participant