[gatsby-source-contentful]: Report illegal content model names #29446
Unanswered
daugsbi
asked this question in
Ideas / Feature Requests
Replies: 1 comment 5 replies
-
@axe312ger this sounds like a relatively simple DX fix. What do you reckon? |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description
After upgrading my project to the latest gatsby and gatsby-source-contentful version, I was getting an error during development and building the project:
TypeError: typeComposer.addInterface is not a function
.I was able to determine the problem relies in gatsby-source-contentful. After a lot of debugging I've realised that a naming collision between my content model and the Interfaces from gatsby-source-contentful triggered the error.
I didn't expect that the naming of content models is limited. Additionally the error message didn't help.
Steps to reproduce
Create a workspace in Contentful and name a model
Reference
. This could also work withEntity
.Expected result
An error message should warn the user.
i.e. Incompatible ContentModel detected. Please rename Reference/Entity to something else.
Actual result
TypeError: typeComposer.addInterface is not a function
.Environment
System:
OS: Linux 5.4 Ubuntu 20.04.2 LTS (Focal Fossa)
CPU: (24) x64 AMD Ryzen 9 3900X 12-Core Processor
Shell: 5.0.17 - /bin/bash
Binaries:
Node: 14.15.0 - /usr/local/bin/node
Yarn: 1.22.4 - /usr/bin/yarn
npm: 6.14.8 - /usr/local/bin/npm
Languages:
Python: 2.7.18 - /usr/bin/python
Browsers:
Chrome: 88.0.4324.150
Firefox: 85.0.1
npmPackages:
gatsby: ^2.32.3 => 2.32.3
gatsby-background-image: ^1.4.1 => 1.4.1
gatsby-image: ^2.11.0 => 2.11.0
gatsby-plugin-feed: ^2.13.0 => 2.13.0
gatsby-plugin-image: ^0.7.1 => 0.7.1
gatsby-plugin-mailgo: ^0.11.3 => 0.11.3
gatsby-plugin-manifest: ^2.12.0 => 2.12.0
gatsby-plugin-offline: ^3.10.0 => 3.10.0
gatsby-plugin-plausible: ^0.0.7 => 0.0.7
gatsby-plugin-react-helmet: ^3.10.0 => 3.10.0
gatsby-plugin-remove-trailing-slashes: ^2.10.0 => 2.10.0
gatsby-plugin-robots-txt: ^1.5.5 => 1.5.5
gatsby-plugin-sharp: ^2.14.1 => 2.14.1
gatsby-plugin-sitemap: ^2.12.0 => 2.12.0
gatsby-plugin-tslint: ^0.0.2 => 0.0.2
gatsby-plugin-typescript: ^2.12.0 => 2.12.0
gatsby-plugin-webpack-bundle-analyser-v2: ^1.1.20 => 1.1.20
gatsby-remark-attr: ^0.1.0 => 0.1.0
gatsby-remark-autolink-headers: ^2.11.0 => 2.11.0
gatsby-remark-grid-tables: ^0.1.0 => 0.1.0
gatsby-remark-table-of-contents: ^1.0.0 => 1.0.0
gatsby-remark-vscode: ^3.2.0 => 3.2.0
gatsby-source-contentful: 4.6.1 => 4.6.1
gatsby-source-filesystem: ^2.11.0 => 2.11.0
gatsby-theme-material-ui: ^1.0.9 => 1.0.13
gatsby-transformer-remark: ^2.16.0 => 2.16.0
gatsby-transformer-sharp: ^2.12.0 => 2.12.0
Beta Was this translation helpful? Give feedback.
All reactions