contentful-to-sanity
contentful-to-sanity copied to clipboard
No dataset.ndjson being created
Hi, I am attempting to use this to move a project from Contentful to Sanity and unfortunately running into an issue.
I have created a clean Sanity project and then run npx contentful-to-sanity@latest -s <space-id> -t <management-token> -a <access-token> ./migrate
with my proper Space ID, Management Token, and API Key.
Everything runs fine by the looks of it, though maybe only up to a point, because my ./migrate
directory only contains:
-
contentful.json
-
contentful.published.json
-
schema.ts
As far as I understand it should also include a dataset.ndjson
and sanity.config.ts
.
Here is what my terminal logs:
✔ Initialize client (1s)
✔ Fetching data from space
✔ Connecting to space (1s)
✔ Fetching content types data (1s)
✔ Fetching tags data (1s)
✔ Fetching editor interfaces data (6s)
✔ Fetching content entries data (5s)
✔ Fetching assets data (2s)
✔ Fetching locales data (1s)
↓ Fetching webhooks data [skipped]
↓ Fetching roles data [skipped]
↓ Download assets [skipped]
✔ Write export log file
✔ Lookup directory to store the logs
✔ Create log directory
✔ Writing data to file
┌──────────────────────────┐
│ Exported entities │
├───────────────────┬──────┤
│ Content Types │ 30 │
├───────────────────┼──────┤
│ Tags │ 1 │
├───────────────────┼──────┤
│ Editor Interfaces │ 30 │
├───────────────────┼──────┤
│ Entries │ 1581 │
├───────────────────┼──────┤
│ Assets │ 688 │
├───────────────────┼──────┤
│ Locales │ 1 │
└───────────────────┴──────┘
The export took less than a minute (17s)
Stored space data to json file at: /Users/jessemclean/GitHub/ian-port/migrate/contentful.json
The following 0 errors and 8 warnings occurred:
13:02:58 - Rate limit error occurred. Waiting for 1586 ms before retrying...
13:02:58 - Rate limit error occurred. Waiting for 1690 ms before retrying...
13:02:58 - Rate limit error occurred. Waiting for 1632 ms before retrying...
13:02:58 - Rate limit error occurred. Waiting for 1684 ms before retrying...
13:02:58 - Rate limit error occurred. Waiting for 1614 ms before retrying...
13:02:58 - Rate limit error occurred. Waiting for 1600 ms before retrying...
13:03:00 - Rate limit error occurred. Waiting for 1650 ms before retrying...
13:03:00 - Rate limit error occurred. Waiting for 1623 ms before retrying...
The export was successful.
✔ Initialize client (1s)
✔ Fetching data from space
✔ Connecting to space (2s)
✔ Fetching content types data (1s)
✔ Fetching tags data (1s)
✔ Fetching editor interfaces data (4s)
✔ Fetching content entries data (2s)
✔ Fetching assets data (1s)
✔ Fetching locales data (1s)
↓ Fetching webhooks data [skipped]
↓ Fetching roles data [skipped]
↓ Download assets [skipped]
✔ Write export log file
✔ Lookup directory to store the logs
✔ Create log directory
✔ Writing data to file
┌──────────────────────────┐
│ Exported entities │
├───────────────────┬──────┤
│ Content Types │ 30 │
├───────────────────┼──────┤
│ Tags │ 1 │
├───────────────────┼──────┤
│ Editor Interfaces │ 30 │
├───────────────────┼──────┤
│ Entries │ 1414 │
├───────────────────┼──────┤
│ Assets │ 660 │
├───────────────────┼──────┤
│ Locales │ 1 │
└───────────────────┴──────┘
The export took less than a minute (10s)
Stored space data to json file at: /Users/jessemclean/GitHub/ian-port/migrate/contentful.published.json
The following 0 errors and 6 warnings occurred:
13:03:16 - Rate limit error occurred. Waiting for 1681 ms before retrying...
13:03:16 - Rate limit error occurred. Waiting for 1600 ms before retrying...
13:03:16 - Rate limit error occurred. Waiting for 1608 ms before retrying...
13:03:16 - Rate limit error occurred. Waiting for 1699 ms before retrying...
13:03:16 - Rate limit error occurred. Waiting for 1667 ms before retrying...
13:03:16 - Rate limit error occurred. Waiting for 1641 ms before retrying...
The export was successful.
Custom True and False labels are not supported by default (hideNonFirmInsights)
The Contentful content type "image" is a reserved name in Sanity. Renaming to "contentful_image"
Unique validation only supported on slug fields by default. Consider adding custom validation for other unique fields or changing field to 'slug'
Custom True and False labels are not supported by default (showContact)
Help on this would be amazing as we are trying to move a client over from Contentful to Sanity (we ♥ Sanity).
p.s. I also came across what I think may be a separate and unrelated issue in the schema.ts
where contentful_imageType
is added to the types
object as contentfulImageType
.
I'm also experiencing the same issue
Just having another look at this and I've found that if I run contentful-to-sanity dataset .
I get the following error:
Error: No transformer found for node type "table"
@dist\contentful-rich-text-to-portable-text.cjs.development.js:302:11
It seems that there is no support for transforming tables in rich text content. It would seem logical that an option should be provided to skip over instances like these?
Have the same issue. Is there any updates how to solve it?
Error: No transformer found for node type "table" @dist\contentful-rich-text-to-portable-text.cjs.development.js:302:11
@alex-mbp Had that same issue as well. Were you able to bypass this?
Error: No transformer found for node type "table" @dist\contentful-rich-text-to-portable-text.cjs.development.js:302:11
@alex-mbp Had that same issue as well. Were you able to bypass this?
I didn't pursue it any further but imagine that the possible solutions include removing table nodes from the Contentful export if they aren't critical, or creating a transformer for the node type.
Have the same issue today, is there any solution for this?