Open
Description
Running into the following error:
Seems to be related to #34 , but with react()
instead of vue()
added as integration.
Makes no difference if putting it before or after NetlifyCMS()
in the config.
The admin dashboard is working perfectly fine without the react integration and dependencies.
Will provide a cleaned repo to reproduce the issue later.
Metadata
Metadata
Assignees
Labels
No labels
Activity
JasperDeLanghe commentedon Dec 15, 2022
Here's a link to the repo: astro-netlifycms-react
And a trace of the failed netlify deploy:
JasperDeLanghe commentedon Dec 15, 2022
After looking through some source code I found this
return [react(), NetlifyCMSIntegration];
at the bottom of the integration index.ts. Seems I don't have to separately add the react integration myself and can just leave it out 🤷♂️My tsx components seem to be working perfectly after leaving it out, rebuilding and serving.
Would be helpful to have this piece of information in the README imo
@astrojs/react
integration #53danxschz commentedon Dec 18, 2022
I'm getting the exact same error message using astro-netlify-cms version 0.5.0 with the react integration. This is the trace:
delucis commentedon Dec 18, 2022
Thanks @danxschz! Any chance you can share your project or a minimal reproduction, e.g. on StackBlitz?
danxschz commentedon Dec 18, 2022
https://github.com/danxschz/studio-mndz
delucis commentedon Dec 18, 2022
Thanks! But it looks like this repo doesn’t have the integration added? Maybe you need to push some local changes?
danxschz commentedon Dec 18, 2022
Yes sorry about that, just pushed the changes
delucis commentedon Dec 18, 2022
Perfect, thank you. I’m very curious what’s going on. Made my own minimal set-up that didn’t do this — https://stackblitz.com/edit/github-u7myzp?file=astro.config.mjs — so it’s helpful to have your example to test with.
delucis commentedon Dec 18, 2022
OK, so one quick fix: downgrading to React 17 and installing
netlify-cms-app
as a direct dependency does seem to fix this:Don’t understand why this would be necessary in one project and not another but will keep investigating.
AntGervais commentedon Feb 17, 2023
Thank you @delucis, I had the same problem and now it's ok 👌
zanhk commentedon Sep 17, 2023
For anyone using pnpm and having the same problem, remember to
shamefully-hoist
packages