-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
After login: TypeError: Cannot convert undefined or null to object #1438
Comments
Three question questions:
This sounds like an error caused by your code and not by the cms itself. |
Hi Robert, thanks for your response. In answer to your questions:
Config:
Markdown:
It could be my code causing the problem, but its not easy to debug when the error message is vague and the call stack obfuscated, even in development mode. I also have the following warning in my console, though I am not sure if it is related or not: |
Thanks for further explaining your problem. Just to confirm, the “npm run build” command passes without errors? My experience with this setup is that the error messages are more clear when the build fails. Otherwise if you could upload your repo to github I could take a look and see if I can provide further help. Can you maybe also link the tutoria you are following? |
@afisher88 What is the stack-trace of the original console error? |
Sorry for the delayed reply. @robertkarlsson I can confirm that the "npm run build" builds with no errors. There is 1 warning:
but I don't believe this is relevant as it occured before installing Netlify CMS @tech4him1 |
@afisher88 Great, the fix was merged in #1438, and it should be in the next release. If you need a temporary fix for now, you should be able to add the following your CMS admin HTML. You'll be able to remove it once you switch to a "real" backend. <script>
// For each folder in your config.
window.repoFiles['src/posts'] = {};
</script> Thanks for your help as well @robertkarlsson! |
BUG REPORT INFORMATION
- Do you want to request a feature or report a bug?
bug
- What is the current behavior?
After logging in to Netlify CMS via the /admin/ page I get a console error of "TypeError: Cannot convert undefined or null to object"
The folder specified in my collection contains 2 markdown files and a javascript file which is a React component:
File structure:
I am using Gatsby as my static site generator.
Dependencies:
- If the current behavior is a bug, please provide the steps to reproduce.
- What is the expected behavior?
I should navigate to the backoffice area of Netlify CMS with no errors.
- Please mention your versions where applicable.
Netlify CMS version: 1.9.0
Browser version: Chrome 67.0.3396.87
Node.JS version: 5.6.0
Operating System: Windows 10 Pro 64Bit (10.0.17134 Build 17134)
- Please link or paste your
config.yml
below if applicable.I am following along with a tutorial and I can confirm the same file structure works with the following dependencies:
The text was updated successfully, but these errors were encountered: