decaporg / gatsby-starter-decap-cms Goto Github PK
View Code? Open in Web Editor NEWExample Gatsby + Decap CMS project
Home Page: https://gatsby-netlify-cms.netlify.app/
License: MIT License
Example Gatsby + Decap CMS project
Home Page: https://gatsby-netlify-cms.netlify.app/
License: MIT License
Hey @erquhart, any idea why the build is failing? It's failing on gatsby-netlify-cms.netlify.com and I was able to replicate it locally. Below is the error I'm getting:
error Generating JavaScript bundles failed
Error: app-57675578fd6eed3803db.js from UglifyJs
SyntaxError: Unexpected character '`' [./~/gatsby-plugin-netlify-cms/gatsby-browser.js:10,0]
I can get this up and running on Netlify, and it works, with NetlifyCMS and all. But when I clone a clean copy to my machine, run yarn
and yarn start
I get this error during the process createLayouts
.
GraphQLError: Cannot query field "allMarkdownRemark" on type "RootQueryType".
I think this is related to #2212, but this example project does not lack .md files. When I update the various transformers, I can maybe get past the error at that step, but it shows up later.
Any thoughts? I also tried Node 8.2.0, 8.4.0, and 9.1.11. I'd like to start from this template, but if I can't, I'll go through https://www.gatsbyjs.org/docs/netlify-cms/
On high sierra, unable to proceed after npm i
since it fails with gyp ERR! configure error gyp ERR! stack Error:
gypfailed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:336:16)
In the readme it says
To test the CMS locally, you'll need run a production build of the site
After build and serving my site locally it promts me to enter my site url. Entering "http://localhost:9000" does not work and then I specify my live url I get redirected to it after login (which is the expected outcome).
So how do I enter the CMS backend locally?
Sorry if I miss something but I could not find the solution in this starter template.
Thanks!
when clicking on the deploy to netlify link it says not found
Seems like everything keeps working fine when I simply remove them. Why are they installed then?
Also I tried to use gatsby-transformer-sharp
as shown in the example in its docs, but for some reason I can't find any ImageSharp
nodes in GraphiQL. Where did they go?
Is this something we can adjust?
For this reason and others, I recommend always just using the ID to select things. IDs are guaranteed to be unique across the site.
Or is selecting by path necessary?
With Netlify CMS one has the possibility to define fields and UI for editing these fields which are then saved to a YAML or JSON file and uploaded to Github. Then these data files can be loaded into a Gatsby app and added to siteMetadata. One can also include fields of type image and they will then be uploaded to Github through the CMS. For example, I can have teamMembers with the field "photo" of type image. With Gatsby I can then query for them like this:
export const pageQuery = graphql`
query TeamQuery {
site {
siteMetadata {
team {
teamMembers {
name
photo
}
}
}
}
}
However, I couldn't find how to use the Gatsby's image processing capabilities in such a query
I would need to issue a different allImageSharp
query for that and it is not obvious to me how to pass the respective photo src to it.
This concerns all the images uploaded via Netlify CMS, not necessarily saved as siteMetadata, since it is then more convenient not to query for them via allImageSharp
, but to use respective fields in frontmatter to get to the image files.
Is there a way to somehow wrap queries for such fields (like photo above) with image processing queries in GraphQL? Or if not, what could be a reasonable way of processing images which are uploaded from Netlify CMS?
Will you add tag pages?
https://www.gatsbyjs.org/docs/adding-tags-and-categories-to-blog-posts/
- Do you want to request a feature or report a bug?
feature
- What is the current behavior?
I tried to add my github infos under backend in the config.yml
If you not careful or you just don't know in the beginning, you get this message quite fast:
Sorry!
There's been an error - please report it!
Error: The GitHub backend needs a "repo" in the backend configuration.
Added the backend information in my config.yml according to https://www.netlify.com/blog/2017/08/17/a-complete-cms-with-no-server-and-18-lines-of-code/
This what the tutorial says:
backend:
name: github
repo: erquhart/blank
this is what I did:
backend:
name: github
branch: heyalbert/socialimpactmag
Did you see it? branch
instead of repo
. Repo is, of course, correct but yeah, I had fun figuring this out.
My suggestion is to make repo the default and not branch. Repo
is what you need first and not branch
.
Suggestion:
Adopt popular community configs and common linting tasks.
Why:
To help others when contributing to and integrating this project.
How:
Use eslint, prettier, stylelint, and/or an editorconfig.
Most of these have a popular community config that could be adopted.
Info:
Related: #67 #68
Semi related: #71 #74 #73
(the semi related ones would have been caught/fixed by using a standard config)
You mentioned in #57 about certain things being removed when a developer forks the project, and i agree this would fall in that category. But i think they are important when contributing to this project.
What are your thoughts?
Otherwise after editing and saving in Netlify CMS the templateKey field is removed and the app doesn't build.
For blog:
- {label: "Template", name: "templateKey", widget: "hidden", default: "blog-post" }
For about:
- {label: "Template", name: "templateKey", widget: "hidden", default: "about-page" }
When I do I fresh install of this through the start with a template link and I login to the new site, if I go to Colllections > Pages it says "No Entries".
According to the config.yml
I think it should display about
and products
Any idea whats going wrong?
(I also tried adding a new collection
with a similar structure as pages
and also getting "No Entries" in the admin panel.)
Hello,
I got away with the following problem by simply giving up on the sharp
module, but would be curious to know if I did anything wrong, or there's a fix I could use.
Here's what I did (apologise for being a bit long):
yarn
with npm install
, then ran npm run develop
brew instal yarn
(in hope that yarn
may be able to build it better than npm)brew link
step did not complete successfully. The formula built, but is not symlinked into /usr/local. Could not symlink bin/node. Target /usr/local/bin/node already exists. You may want to remove it...'. etcyarn
, and got '...sharp: Command failed' and 'cannot find module ...node-gyp.js'npm -v
to discover npm doesn't work anymore: 'Error: Cannot find module.... unsupported.js'brew install node
and got: 'node 10.4.1 is already installed, it's just not linked. You can use brew link node
to link this version'brew link node
and got yet another 'Error: Could not symlink bin/node...' etc, similarly to what it reported during the yarn installation.npm run develop
, it reported an error referenced from sharp.node: 'library not loaded: @rpath/libvips-cpp.42.dylib'. Enclosed the screen print.sharp
altogether and removed it from the package. Everything started working again (24 hours after I've attempted my first npm run develop
...) but I'm curious if there was a fix I could use.Thanks!
Hi, I've used the starter from the landing page of NetlifyCMS before and I hadn't had any issues in the past. Today I couldn't make the setup work, because the user created by the identity system can't have the password reset. It's validated, but can't be used, because I can't reach the point to make the credentials.
Like never, I have exact steps to reproduce! I started to write an article about the starter! 😃
The url of the reset link is http://suspicious-perlman-ee0a64.netlify.com/#invite_token=somehash
How can i make the products page in the example
the home page, the page when the root url visited?
Thank you.
Hey Austin - would you be open to adding me as a collaborator here w/ write access to help maintain?
nice template on localhost but this didnt work for me here: http://mystifying-lamport-da94e6.netlify.com/
sad panda.
When I try to upload image, I get this notification Failed to persist media: TypeError: e.commit is undefined
- I am not sure if this has something to do with the image path. I haven't changed anything yet in the config file (which might be the problem) but I'm curious to know if you are familiar with the error.
Console errors:
Error: Unrecognized front-matter format. (backend.js:161:27)
TypeError: e.commit is undefined (implementation.js:139:6)
TypeError: e.commit is undefined (mediaLibrary.js:89:6)
Fixed by npm i sharp
but looks like it's not in the package.json
but it's in the package-json.lock
file
I would add here something like this:
result.errors.forEach(e => console.error(e.toString()))
Otherwise the errors are not printed and it's super difficult to find the cause why gatsby just stops working. Error can easily appear e.g. when querying for a field which only existed in one .md file. Once the file gets deleted, the field is also removed from GraphQL api.
Gatsby-starter-netlify-cms will have opportunity to choose which version of gatsby to choose 1 or 2?
Expect that gatsby will migrate to version 2 and now only bug fixes are possible to version 1.
The netlify-identity-widget iframe is injected to the DOM on every navigation to the index page ("/" route).
This is a feature proposal.
I found the current HTML of the starter template looks very messy.
I think this could be cleaned up quiet a bit by using a component library for the Bulma css frame work like bloomer and separating in-line styles to const styles = StyleSheet.create({})
(I am a bit of a coding newbie but if people like this idea I'd be happy to remake the templates in this format)
For example the product-page.js
now looks like:
Instead it could look something like
<section className="section section--gradient">
<div className="container">
<div className="section">
<div className="columns">
<div className="column is-10 is-offset-1">
<div className="content">
<div
className="full-width-image-container margin-top-0"
style={{ backgroundImage: `url(${image})` }}
>
<h2
className="has-text-weight-bold is-size-1"
style={{
boxShadow: '0.5rem 0 0 #f40, -0.5rem 0 0 #f40',
backgroundColor: '#f40',
color: 'white',
padding: '1rem',
}}
>
{title}
</h2>
</div>
/* etc.. */
But could instead look like:
<Container>
<Section>
<Columns>
<Column isOffset={1} isSize={10}>
<Content>
<Title isSize={1}>{title}</Title>
</Content>
</Column>
</Columns>
</Section>
</Container>
In src/layouts/all.scss
, adding, for instance $navbar-padding-horizontal: 15rem
on either line 1 or 2 (or anywhere really), before or after @import "~bulma/sass/utilities/initial-variables"
does nothing.
According to the Bulma docs, this should be the correct way to override Bulma variables.
Wasn't clear from the closed issues regarding 2.0 if this is 2.0-ready or not yet.
I'm pretty new to Gatsby + React. I keep getting that Error on gatsby build. Tried manually reinstalling the helmet plugin, to no avail.
Thanks a ton!
I followed instruction in this readme, but when I try to login with Github I got this:
VM719 component---src-pages-index-js-3ecad98b078aeb144417.js:1 Uncaught TypeError: t.handleScriptLoad is not a function
at Object.onLoad (VM719 component---src-pages-index-js-3ecad98b078aeb144417.js:1)
at VM719 component---src-pages-index-js-3ecad98b078aeb144417.js:1
at VM719 component---src-pages-index-js-3ecad98b078aeb144417.js:1
at Array.forEach (<anonymous>)
at a (VM719 component---src-pages-index-js-3ecad98b078aeb144417.js:1)
at HTMLScriptElement.i.onload (VM719 component---src-pages-index-js-3ecad98b078aeb144417.js:1)
I tried to debug it locally, but no matter what I do in src/pages/index.js
file changes are not getting picked up or compiled.
Maybe I'm searching wrong but I want to deploy this via Bitbucket and can't add a service so I get errors in my backend:
/.netlify/git/github/contents/src/pages/blog?ts=1523350390260&ref=master Failed to load resource: the server responded with a status of 404 ()
/.netlify/git/github/contents/static/img?ts=1523350390348&ref=master Failed to load resource: the server responded with a status of 404 ()
Is there a other way to do this?
Hello,
I started with this template and I would like to remove the netlify-cms dependency because I don't use it. But when I do yarn remove netlify-cms
and run yarn build
it gives me following error
success Building CSS — 5.052 s
success Building production JavaScript bundles — 8.878 s
error Building static HTML for pages failed
See our docs page on debugging HTML builds for help https://goo.gl/yL9lND
27 | message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.';
28 |
> 29 | var error = new Error(message);
| ^
30 | error.name = 'Invariant Violation';
31 | error.framesToPop = 1; // we don't care about reactProdInvariant's own frame
32 |
In development mode I get the error saying, expected react component to be class or function, instead got symbol
.
I am trying to find out where this is coming from. Any help will be appreciated.
From @KyleAMathews in #48:
Check out gatsby-starter-blog, it creates paths from the filename. There's a helper function for doing this
This would allow us to not require the path
property in frontmatter, which is a bit of a hang up for Netlify CMS.
I am using this started for an open source web site https://github.com/bzhr/funky_fresh. Identity widget is loaded in the index page https://github.com/bzhr/funky_fresh/blob/master/src/pages/index.js
In the console I can see the widget is loaded by checking the window.netlifyIdentity object. But when I hit the confirm email link in my email I am redirected to the index page, the token is in the URL, but nothing happens.
If the email is from Gmail the user can sign in with gmail and the email will be confirmed, however some users won't use gmail emails, so this isn't a solution. Not sure if I am doing something wrong, or there's an issue with the identity widget.
Hello, I love this starter repo and would like to move forward with it. However, blog posts are currently located at mysite.com/blog/my-blog-post
. How can I remove the blog
path prefix so blog posts are accessible via mysite.com/my-blog-post
?
Thank you!
Are you planning on submitting this to the Netlify CMS docs as a starter site/template?
When in NetlfyCMS, filling in path
with my-hello-world
will make the build fail as described below.
Adding a slash as the other example content items, these pass.
Is it possible to make the following query more flexible for path
values?
export const pageQuery = graphql`
query BlogPostByPath($path: String!) {
markdownRemark(frontmatter: { path: { eq: $path } }) {
html
frontmatter {
path
date(formatString: "MMMM DD, YYYY")
title
description
}
}
}
`;
3:08:42 PM: Build ready to start
3:08:44 PM: Fetching cached dependencies
3:08:45 PM: Starting to download cache of 178.5MB
3:08:46 PM: Finished downloading cache in 1.174106868s
3:08:46 PM: Starting to extract cache
3:08:54 PM: Finished extracting cache in 8.074521067s
3:08:54 PM: Finished fetching cache in 9.401181086s
3:08:54 PM: Starting to prepare the repo for build
3:08:54 PM: Preparing Git Reference refs/heads/master
3:08:55 PM: Found netlify.toml. Overriding site configuration
3:08:55 PM: Running build command: npm run build
3:08:55 PM: Installing dependencies
3:08:58 PM: v6.12.3 is already installed.
3:09:00 PM: Now using node v6.12.3 (npm v3.10.10)
3:09:00 PM: Using version v6.12.3 of node
3:09:00 PM: Using /opt/buildhome/.rvm/gems/ruby-2.1.2
3:09:01 PM: Installing NPM modules using Yarn version 0.18.1
3:09:01 PM: yarn install v0.18.1
3:09:02 PM: [1/4] Resolving packages...
3:09:03 PM: success Already up-to-date.
3:09:03 PM: Done in 1.60s.
3:09:03 PM: NPM modules installed using Yarn
3:09:03 PM: Installing missing commands
3:09:03 PM: Executing user command: npm run build
3:09:04 PM: > [email protected] build /opt/build/repo
3:09:04 PM: > gatsby build
3:09:06 PM: success delete html files from previous builds — 0.015 s
3:09:06 PM: success open and validate gatsby-config.js — 0.007 s
3:09:07 PM: success copy gatsby files — 0.034 s
3:09:07 PM: success onPreBootstrap — 0.011 s
3:09:07 PM: success source and transform nodes — 0.187 s
3:09:07 PM: success building schema — 0.357 s
3:09:07 PM: success createLayouts — 0.015 s
3:09:08 PM: success createPages — 0.130 s
3:09:08 PM: success createPagesStatefully — 0.021 s
3:09:08 PM: success onPreExtractQueries — 0.002 s
3:09:08 PM: success extract queries from components — 0.285 s
3:09:08 PM: The GraphQL query from /opt/build/repo/src/templates/blog-post.js failed
3:09:08 PM: Errors:
3:09:08 PM: GraphQLError: Cannot read property 'id' of undefined
3:09:08 PM: Query:
3:09:08 PM: query BlogPostByPath(
3:09:08 PM: $path: String!
3:09:08 PM: ) {
3:09:08 PM: markdownRemark(frontmatter: {path: {eq: $path}}) {
3:09:08 PM: html
3:09:08 PM: frontmatter {
3:09:08 PM: path
3:09:08 PM: date(formatString: "MMMM DD, YYYY")
3:09:08 PM: title
3:09:08 PM: description
3:09:08 PM: }
3:09:08 PM: }
3:09:08 PM: }
3:09:08 PM: success run graphql queries — 0.080 s
3:09:08 PM: success write out page data — 0.004 s
3:09:08 PM: success write out redirect data — 0.001 s
3:09:08 PM: success update schema — 0.270 s
3:09:08 PM: The GraphQL query from /opt/build/repo/src/templates/blog-post.js failed
3:09:08 PM: Errors:
3:09:08 PM: GraphQLError: Cannot read property 'id' of undefined
3:09:08 PM: Query:
3:09:08 PM: query BlogPostByPath(
3:09:08 PM: $path: String!
3:09:08 PM: ) {
3:09:08 PM: markdownRemark(frontmatter: {path: {eq: $path}}) {
3:09:08 PM: html
3:09:08 PM: frontmatter {
3:09:08 PM: path
3:09:08 PM: date(formatString: "MMMM DD, YYYY")
3:09:08 PM: title
3:09:08 PM: description
3:09:09 PM: }
3:09:09 PM: }
3:09:09 PM: }
3:09:09 PM: success onPostBootstrap — 0.004 s
3:09:09 PM: info bootstrap finished - 4.227 s
3:09:09 PM: The GraphQL query from /opt/build/repo/src/templates/blog-post.js failed
3:09:09 PM: Errors:
3:09:09 PM: GraphQLError: Cannot read property 'id' of undefined
3:09:09 PM: Query:
3:09:09 PM: query BlogPostByPath(
3:09:09 PM: $path: String!
3:09:09 PM: ) {
3:09:09 PM: markdownRemark(frontmatter: {path: {eq: $path}}) {
3:09:09 PM: html
3:09:09 PM: frontmatter {
3:09:09 PM: path
3:09:09 PM: date(formatString: "MMMM DD, YYYY")
3:09:09 PM: title
3:09:09 PM: description
3:09:09 PM: }
3:09:09 PM: }
3:09:09 PM: }
3:09:09 PM: The GraphQL query from /opt/build/repo/src/templates/blog-post.js failed
3:09:09 PM: Errors:
3:09:09 PM: GraphQLError: Cannot read property 'id' of undefined
3:09:09 PM: Query:
3:09:09 PM: query BlogPostByPath(
3:09:09 PM: $path: String!
3:09:09 PM: ) {
3:09:09 PM: markdownRemark(frontmatter: {path: {eq: $path}}) {
3:09:09 PM: html
3:09:09 PM: frontmatter {
3:09:09 PM: path
3:09:09 PM: date(formatString: "MMMM DD, YYYY")
3:09:09 PM: title
3:09:09 PM: description
3:09:09 PM: }
3:09:09 PM: }
3:09:09 PM: }
3:09:09 PM: The GraphQL query from /opt/build/repo/src/templates/blog-post.js failed
3:09:09 PM: Errors:
3:09:09 PM: GraphQLError: Cannot read property 'id' of undefined
3:09:09 PM: Query:
3:09:09 PM: query BlogPostByPath(
3:09:09 PM: $path: String!
3:09:09 PM: ) {
3:09:09 PM: markdownRemark(frontmatter: {path: {eq: $path}}) {
3:09:09 PM: html
3:09:09 PM: frontmatter {
3:09:09 PM: path
3:09:09 PM: date(formatString: "MMMM DD, YYYY")
3:09:10 PM: title
3:09:10 PM: description
3:09:10 PM: }
3:09:10 PM: }
3:09:10 PM: }
3:09:10 PM: The GraphQL query from /opt/build/repo/src/templates/blog-post.js failed
3:09:10 PM: Errors:
3:09:10 PM: GraphQLError: Cannot read property 'id' of undefined
3:09:10 PM: Query:
3:09:10 PM: query BlogPostByPath(
3:09:10 PM: $path: String!
3:09:10 PM: ) {
3:09:10 PM: markdownRemark(frontmatter: {path: {eq: $path}}) {
3:09:10 PM: html
3:09:10 PM: frontmatter {
3:09:10 PM: path
3:09:10 PM: date(formatString: "MMMM DD, YYYY")
3:09:10 PM: title
3:09:10 PM: description
3:09:10 PM: }
3:09:10 PM: }
3:09:10 PM: }
3:09:19 PM: success Building CSS — 10.535 s
3:09:19 PM: The GraphQL query from /opt/build/repo/src/templates/blog-post.js failed
3:09:19 PM: Errors:
3:09:19 PM: GraphQLError: Cannot read property 'id' of undefined
3:09:19 PM: Query:
3:09:19 PM: query BlogPostByPath(
3:09:19 PM: $path: String!
3:09:19 PM: ) {
3:09:19 PM: markdownRemark(frontmatter: {path: {eq: $path}}) {
3:09:19 PM: html
3:09:19 PM: frontmatter {
3:09:19 PM: path
3:09:19 PM: date(formatString: "MMMM DD, YYYY")
3:09:19 PM: title
3:09:19 PM: description
3:09:19 PM: }
3:09:19 PM: }
3:09:19 PM: }
3:09:19 PM: The GraphQL query from /opt/build/repo/src/templates/blog-post.js failed
3:09:19 PM: Errors:
3:09:19 PM: GraphQLError: Cannot read property 'id' of undefined
3:09:19 PM: Query:
3:09:19 PM: query BlogPostByPath(
3:09:19 PM: $path: String!
3:09:19 PM: ) {
3:09:19 PM: markdownRemark(frontmatter: {path: {eq: $path}}) {
3:09:19 PM: html
3:09:19 PM: frontmatter {
3:09:19 PM: path
3:09:19 PM: date(formatString: "MMMM DD, YYYY")
3:09:19 PM: title
3:09:19 PM: description
3:09:19 PM: }
3:09:19 PM: }
3:09:19 PM: }
3:10:08 PM: success Building production JavaScript bundles — 48.725 s
3:10:08 PM: The GraphQL query from /opt/build/repo/src/templates/blog-post.js failed
3:10:08 PM: Errors:
3:10:08 PM: GraphQLError: Cannot read property 'id' of undefined
3:10:08 PM: Query:
3:10:08 PM: query BlogPostByPath(
3:10:08 PM: $path: String!
3:10:08 PM: ) {
3:10:08 PM: markdownRemark(frontmatter: {path: {eq: $path}}) {
3:10:08 PM: html
3:10:08 PM: frontmatter {
3:10:08 PM: path
3:10:08 PM: date(formatString: "MMMM DD, YYYY")
3:10:08 PM: title
3:10:08 PM: description
3:10:08 PM: }
3:10:08 PM: }
3:10:08 PM: }
3:10:08 PM: The GraphQL query from /opt/build/repo/src/templates/blog-post.js failed
3:10:08 PM: Errors:
3:10:08 PM: GraphQLError: Cannot read property 'id' of undefined
3:10:08 PM: Query:
3:10:08 PM: query BlogPostByPath(
3:10:08 PM: $path: String!
3:10:08 PM: ) {
3:10:08 PM: markdownRemark(frontmatter: {path: {eq: $path}}) {
3:10:08 PM: html
3:10:08 PM: frontmatter {
3:10:08 PM: path
3:10:08 PM: date(formatString: "MMMM DD, YYYY")
3:10:08 PM: title
3:10:08 PM: description
3:10:08 PM: }
3:10:08 PM: }
3:10:08 PM: }
3:10:12 PM: error Building static HTML for pages failed
3:10:12 PM: See our docs page on debugging HTML builds for help https://goo.gl/yL9lND
3:10:12 PM: 29 |
3:10:12 PM: 30 | return (<BlogPostTemplate
3:10:12 PM: > 31 | content={post.html}
3:10:12 PM: | ^
3:10:12 PM: 32 | contentComponent={HTMLContent}
3:10:12 PM: 33 | description={post.frontmatter.description}
3:10:12 PM: 34 | helmet={<Helmet title={`Blog | ${post.frontmatter.title}`} />}
3:10:12 PM:
3:10:12 PM: WebpackError: Cannot read property 'html' of null
3:10:12 PM:
3:10:12 PM: - blog-post.js:31 exports.default
3:10:12 PM: src/templates/blog-post.js:31:19
3:10:12 PM:
3:10:12 PM: - ReactCompositeComponent.js:306 ReactCompositeComponentWrapper._constructComp onentWithoutOwner
3:10:12 PM: ~/react-dom/lib/ReactCompositeComponent.js:306:1
3:10:12 PM:
3:10:12 PM: - ReactCompositeComponent.js:282 ReactCompositeComponentWrapper._constructComp onent
3:10:12 PM: ~/react-dom/lib/ReactCompositeComponent.js:282:1
3:10:12 PM:
3:10:12 PM: - ReactCompositeComponent.js:185 ReactCompositeComponentWrapper.mountComponent ~/react-dom/lib/ReactCompositeComponent.js:185:1
3:10:12 PM:
3:10:12 PM: - ReactReconciler.js:43 Object.mountComponent
3:10:12 PM: ~/react-dom/lib/ReactReconciler.js:43:1
3:10:12 PM:
3:10:12 PM: - ReactMultiChild.js:234 ReactDOMComponent.mountChildren
3:10:12 PM: ~/react-dom/lib/ReactMultiChild.js:234:1
3:10:12 PM:
3:10:12 PM: - ReactDOMComponent.js:657 ReactDOMComponent._createContentMarkup
3:10:12 PM: ~/react-dom/lib/ReactDOMComponent.js:657:1
3:10:12 PM:
3:10:12 PM: - ReactDOMComponent.js:524 ReactDOMComponent.mountComponent
3:10:12 PM: ~/react-dom/lib/ReactDOMComponent.js:524:1
3:10:12 PM:
3:10:12 PM: - ReactReconciler.js:43 Object.mountComponent
3:10:12 PM: ~/react-dom/lib/ReactReconciler.js:43:1
3:10:12 PM:
3:10:12 PM: - ReactMultiChild.js:234 ReactDOMComponent.mountChildren
3:10:12 PM: ~/react-dom/lib/ReactMultiChild.js:234:1
3:10:12 PM:
3:10:12 PM:
3:10:12 PM: npm ERR! Linux 4.4.86+
3:10:12 PM: npm ERR! argv "/opt/buildhome/.nvm/versions/node/v6.12.3/bin/node" "/opt/buildhome/.nvm/versions/node/v6.12.3/bin/npm" "run" "build"
3:10:12 PM: npm ERR! node v6.12.3
3:10:12 PM: npm ERR! npm v3.10.10
3:10:12 PM: npm ERR! code ELIFECYCLE
3:10:12 PM: npm ERR! [email protected] build: `gatsby build`
3:10:12 PM: npm ERR! Exit status 1
3:10:12 PM: npm ERR!
3:10:12 PM: npm ERR! Failed at the [email protected] build script 'gatsby build'.
3:10:12 PM: npm ERR! Make sure you have the latest version of node.js and npm installed.
3:10:12 PM: npm ERR! If you do, this is most likely a problem with the gatsby-starter-netlify-cms package,
3:10:12 PM: npm ERR! not with npm itself.
3:10:12 PM: npm ERR! Tell the author that this fails on your system:
3:10:12 PM: npm ERR! gatsby build
3:10:12 PM: npm ERR! You can get information on how to open an issue for this project with:
3:10:12 PM: npm ERR! npm bugs gatsby-starter-netlify-cms
3:10:12 PM: npm ERR! Or if that isn't available, you can get their info via:
3:10:13 PM: npm ERR! npm owner ls gatsby-starter-netlify-cms
3:10:13 PM: npm ERR! There is likely additional logging output above.
3:10:13 PM: npm ERR! Please include the following file with any support request:
3:10:13 PM: npm ERR! /opt/build/repo/npm-debug.log
3:10:13 PM: Caching artifacts
3:10:13 PM: Cached NPM modules
3:10:13 PM: Saved Yarn cache
3:10:13 PM: Saved Cache Directory
3:10:13 PM: Build complete: exit code: 1
3:10:13 PM: Error running command: Build script returned non-zero exit code: 1
3:10:13 PM: Failing build: Failed to build site
3:10:13 PM: failed during stage 'building site': Build script returned non-zero exit code: 1
3:10:13 PM: Finished processing build request in 1m29.642177303s
Halo, looks like it's not responsive already.
will be nice to have responsive feature with hamburger menu.
Thanks
I published the site (without any modification after creating) on Netlify (just by dropping the public folder), and enabled the Identity service (with gitlab provider). After logging in with Gitlab account I'm redirected to main site page (with OAuth access_token) but it didn't redirect me back to admin interface.
I had to add
<script src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script>
in <head>
and
<script>
if (window.netlifyIdentity) {
window.netlifyIdentity.on("init", user => {
if (!user) {
window.netlifyIdentity.on("login", () => {
document.location.href = "/admin/";
});
}
});
}
</script>
before <body>
end in main site index.html just as the documentation says. Shouldn't you make gatsby add it automatically to public/index.html?
Nonetheless, admin interface now loads, but I fail to see any content that is already present on the site. But maybe it's because the site was not created from Git.
Not sure why but all I did was clear out the content and re-add my own but it never renders the images. You can see what I'm trying to fix at www.geekedoutsolutions.com and the code is at https://github.com/Geeked-Out-Solutions/blog its not giving me any errors so if you know any reason this might be happening I'm all ears can't find it yet.
Thanks
@KyleAMathews updated the gatsby-plugin-netlify-cms to install netlify-cms
as a dependency.
Add prop type validation to components.
Just a heads up! We're looking to feature this (excellent!) template on the docs site with the 1.0 launch as we try to improve discoverability of great community resources like this.
We may try to get a PR in for custom preview styling (and maybe other integration tweaks), and another to bump the version to 1.0 at release time. If you have any availability to review pull requests as they come it would be super helpful!
cc/ @Benaiah
I'm trying to get entries from a collection, just like in the sample app, the home page is pulling the blog posts.
I was able to generate the new collection and then create a new page under the /src/pages
. Inside of that page, I have this query:
export const ProdQuery = graphql
query ProdQuery {
allMarkdownRemark(sort: { order: DESC, fields: [frontmatter___date] }) {
edges {
node {
html
frontmatter {
price
prod_image
slug
sku
templateKey
title
}
}
}
}
}
this gets all the entries, and then in my component I have to do something like:
const products = posts.filter( post => post.node.frontmatter.templateKey === 'product-details')
to only get the product-details collection entries.
The question is, how can I tell the graphql to get me the product details only, so I don't have to be pulling all the entries, and then having to filter what I need, in my component?
Thanks in advance!
After deployment to Netlify I've changed the URL of the site. Now when I try to test the /admin
page locally I get a error:
Failed to load settings from https://some-link-e767e6.netlify.com/.netlify/identity
The URL its displaying here is the old one so I'm not surprised it can't load the settings but I can't seem to find where I can update this url. Any ideas?
The netlify-cms CSS file is hardcoded in /static/admin/index.html:
<link rel="stylesheet" href="https://unpkg.com/netlify-cms@^1.0.1/dist/cms.css" />
This leads to problems when upgrading netlify-cms to a new version and when a restrictive Content Security Policy is used.
The right CSS file is already in /cms/node_modules/netlify-cms/dist/cms.css
... is it possible to use this?
I started a new project, and if I run npm install
I get this message.
I can't run gatsby develop
either.
Any help will be appreciate it.
npm WARN [email protected] No repository field.
npm ERR! Cannot read property '0' of undefined
Logs:
30254 warn [email protected] No repository field.
30255 verbose stack TypeError: Cannot read property '0' of undefined
30255 verbose stack at rmStuff (/usr/local/lib/node_modules/npm/lib/unbuild.js:61:24)
30255 verbose stack at tryCatcher (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
30255 verbose stack at ret (eval at makeNodePromisifiedEval (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promisify.js:184:12), <anonymous>:13:39)
30255 verbose stack at lifecycle.then.then (/usr/local/lib/node_modules/npm/lib/install/action/unbuild.js:12:12)
30255 verbose stack at tryCatcher (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
30255 verbose stack at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:512:31)
30255 verbose stack at Promise._settlePromise (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:569:18)
30255 verbose stack at Promise._settlePromise0 (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:614:10)
30255 verbose stack at Promise._settlePromises (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:693:18)
30255 verbose stack at Promise._fulfill (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:638:18)
30255 verbose stack at /usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/nodeback.js:42:21
30255 verbose stack at <anonymous>
Has anyone been able to implement pagination for Use case 1 listed on https://www.npmjs.com/package/gatsby-paginate
Having a difficult time
I know @Furgas mentioned this in #3 but it is also happening to me & I wondered if y'all solved this.
In admin all is empty, and if I try to create a new blog post Netlify cms throws the error Failed to persist entry: TypeError: Cannot read property 'sha' of undefined
. All seems to be configured correctly in config.yml & I couldn't find an answer in the Netlify docs. ¯_(ツ)_/¯
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.