prismicio / prismic-ts-codegen

A Prismic model-to-TypeScript-type generator.
Apache License 2.0
18 stars 6 forks source link

ManipulationError when generating types (using remote models) #24

Closed AugusDogus closed 2 years ago

AugusDogus commented 2 years ago

Versions

Reproduction

Can provide privately if required.

Additional Details
[package.json](https://gist.github.com/AugusDogus/bfb1f36cbf6cc09275f40437517fcc63) [logs](https://gist.github.com/AugusDogus/e4017e0232ca1e54d25d917935f6565b)

Steps to reproduce

  1. Run npx prismic-ts-codegen init
  2. Configure the config file for loading remote models from the repo amli-website-dev.
  3. Run npx prismic-ts-codegen

    What is expected?

    The types file is generated.

What is actually happening?

The codegen errors out with ManipulationError: Manipulation error: A syntax error was inserted.

angeloashmore commented 2 years ago

Hi @AugusDogus, thanks for reporting this issue!

It should be fixed in the latest version, v0.1.1. You can find more details about the fix here: #25

You can upgrade to the latest version with the following command:

npm install --save-dev prismic-ts-codegen@latest

If the issue is not fixed after upgrading, please let me know and I'll take another look. Thanks again! 🙂