Skip to content
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

Docs/minimal template for installation with npm/yarn #5266

Closed
mvolfik opened this issue Apr 13, 2021 · 1 comment · Fixed by #5271
Closed

Docs/minimal template for installation with npm/yarn #5266

mvolfik opened this issue Apr 13, 2021 · 1 comment · Fixed by #5271

Comments

@mvolfik
Copy link

mvolfik commented Apr 13, 2021

Both Readme and docs say that it's possible to install CMS with NPM/yarn. However, it isn't as simple as npm install netlify-cms-app + import CMS from '...'; CMS.init(). After doing simply that I get a ton of unmet peer dependency errors (#1678; the result is pretty much the same with netlify-cms package, just that React is installed). I tried manually installing all these deps and building with esbuild, but that doesn't really work - there are some conflicts with react version, and also some modules require('path') (why? NetlifyCMS is only meant to be run in the browser...). Apparently there are some dependencies on webpack's inner workings or?

Also I looked at netlify-templates/one-click-hugo-cms – that somehow builds, but I have no idea why. And to be honest, I don't think this template is very useful – many moving parts. I would prefer something with the minimal build pipeline that works and without tens of plugins which I have no idea what's their purpose.

My working effort on creating such template is here, but now I'm stuck at a cryptic error (shown after opening the built files in browser):

Invariant Violation: Could not find "store" in either the context or props of "Connect(Notifs)".
Either wrap the root component in a <Provider>, or explicitly pass "store" as a prop to "Connect(Notifs)".

CC decaporg/decap-website#6 ?

@erezrokah
Copy link
Contributor

Hi @mvolfik I believe this is related to #5087 and also only partially fixed for #5221

Pinning netlify-cms-app to 2.14.35 works for your repo.

Going to revert #5087 until I can figure this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants