-
Notifications
You must be signed in to change notification settings - Fork 34
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
bug(gatsby-source-strapi): The plugin "gatsby-source-strapi" created a node of a type "File" owned by "gatsby-source-filesystem". #426
Comments
Same here. |
Not sure if this will help, but I seem to only be having issues with images retrieved from Strapi. Everything seems to be working properly for me. |
I also got this error trying to upgrade to the mentioned packages and versions. It seems that rolling back just the Gatsby package fixed the original error, although it did end up failing due to a different one. The new error seems unrelated... Maybe due to having newer plugin packages that are incompatible with the older gatsby? This at least seems to indicate that the original issue is with a change in the 5.9.0 gatsby package. Before upgrading:
After upgrading:
At this point I got the exception about gatsby-source-strapi trying to create a File node, so I rolled back to
|
Same problem here. In my Strapi collection, I have a "main_image" and "carousel_images" it I call bouth at the same time the error happens:
collectionTypes: [
{
singularName: "job",
queryParams: {
populate: {
title: "*",
job_categories: "*",
main_image: "*",
// carousel_images: "*", ---> if take of the comment the code broke.
},
},
},
], |
@laurenskling The error is obviously related to: https://www.gatsbyjs.com/docs/reference/release-notes/v5.9/#performance-improvements. It's strange that such breaking changes appear in the minor version. Currently, gatsby-source-strapi doesn't even mention that it doesn't support gatsby 5.9.0, I think this should have a very high priority. |
Started getting this same error with |
@ramit-mitra Strapi 3 isn't supported by the latest version of this package. You can only use v1. I am currently still on Gatsby 4, so I cannot really help directly with this error. Plus I have no free time to look into it currently. I invite everyone here to contribute into getting this error solved. |
- conflict between gatsby-source-strapi and gatsby-source-filesystem - @see gatsby-uc/plugins#426
I got the same error with gatbsy 5.8.1. I tried to use gatsby 5.7.0 but still getting the error. Is there a good package combination where it works at the moment? |
In my case, the build problem solved by adding remoteFileHeaders to strapiConfig in the gatsby-config. Like this
|
I renamed a bunch of the variables in /gatsby-source-strapi/dist/download-media-files.js to I don't know which one is the fix but something in here lets the site build. |
Is there anyone here who has fixed this problem? |
Hello, I have the same trouble Error: The plugin "gatsby-source-strapi" created a node of a type owned by another plugin. |
UPDATE: Thanks a lot @rileybathurst Now it works, but also you have to change the line 57 in /gatsby-source-strapi/dist/gatsby-node.js to const existingNodes = getNodes().filter(n => n.internal.owner === `gatsby-source-strapi` || n.internal.type === "strapiFile"); Regards |
downgrading to |
@laurenskling I attempted the suggested approach (enableStatefulSourceNodes) but unfortunately did not achieve the desired outcome. Considering the issue stems from the node ownership override by the |
Gatsby maintainer here 👋 Can you please open a bug report in our repo about this: https://github.com/gatsbyjs/gatsby/issues/new?assignees=&labels=type%3A+bug&projects=&template=BUG_REPORT.yml This shouldn't happen and is probably a regression from gatsbyjs/gatsby#37782 Thanks! |
Hello @LekoArts, I don't understand why it's considered a regression in |
In simple terms:
However, https://github.com/gatsby-uc/plugins/pull/431/files#diff-77a5459c74cf8818897d5690b621b8bca7f96d363a1eb68a6ed55f65711e061aR61 seems like a correct change. The source plugin shouldn't touch So does your PR fix it if you remove the |
Hello, Thanks for the explanation ! Nope, it doesn't work if you don't have the For me the But I don't have the energy to open an issue and deep dive into the issue for the |
Hey @tinque are you doing anything other than the https://github.com/tinque/gastby-uc-plugins/commit/1a174f827be2b3810b9f7b2be27f0f85fd505560 updates? I am still hitting the issue with those updates I get a console error showing err Error: The plugin "gatsby-source-strapi-file" created a node of a type owned by another plugin.
".cache/caches/gatsby-source-strapi-file/0fe16aae7ec04193134414747f7d0c86/TWIG_Member_Seal_2022_23_41c176880a.webp", |
Hey @rileybathurst 🙂 |
Hey @tinque I have executed the command gatsby clean and deleted the Cache folder, but I still get the same error message . |
I went ahead and created an issue at gatsbyjs/gatsby#38117 to track this topic upstream in Gatsby. @LekoArts please update the title so something that makes sense for the Gatsby Repo. Let me know it the ticket over there needs more information that is not present in this thread. |
Yeah I used the gatsby clean and keep getting the error |
@tinque I confirm that the proposed PR doesn't work, using: gatsby 5.8.1, gatsby-source-strapi 3.2.0. Still getting the same error message "The node type "File" is owned by "gatsby-source-filesystem"", even after running gatsby clean. |
In node_modules/gatsby-source-strapi/dist/gatsby-node.js, if you remove the internal type check of "File" in the below line (line 57): And then remove the touchNode on line 78 of download-media-files.js and return the fileNodeID when cached (see below taken from lines 76-80), then both pieces will work.
|
has anyone tried @solvticians-be 's answer? |
@orkunzozturk I confirm that @solvticians-be 's change appears to be working. |
Not trying to hijack the thread, but I have noted this same issue with the Directus source plugin for gatsby. The same error and issue, while reverting to gatsby 5.8 and gatsby-source-filesystem 5.8 things work again. |
Hence @LekoArts is saying they need to fix a bug in Gatsby. 😄 |
Indeed, merely adding further context to the issue. |
I fixed it by moving |
can you send a screenshot with package.json? |
Rolling back to gatsby |
Please give |
ERROR during gatsby develop after upgrade to Gatsby 5.9.0 & gatsby-source-filesystem 5.9.0 (with gatsby-source-strapi 3.2.0)
Log:
ERROR #11321 API.NODE.EXECUTION
"gatsby-source-strapi" threw an error while running the sourceNodes lifecycle:
The plugin "gatsby-source-strapi" created a node of a type owned by another plugin.
The node type "File" is owned by "gatsby-source-filesystem".
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Gatsby develop should not fail
System Info
"gatsby": "^5.9.0",
"gatsby-source-filesystem": "^5.9.0",
"gatsby-source-strapi": "^3.2.0",
"react": "^18.2.0",
"node": "18.13.0"
The text was updated successfully, but these errors were encountered: