Closed andrevandal closed 5 years ago
I think can be related with https://github.com/gatsbyjs/gatsby/issues/14898
I remove ${__PATH_PREFIX__}
from my fork (https://github.com/derevandal/gridsome-plugin-netlify-cms/) and this error disappears.
@derevandal Thanks! I just published v1.0.8; does this work for you?
@tobymarsden I still get this error with v1.0.9? Exactly the same setup as @derevandal ...
@thetre97 Please could you post your Netlify CMS version, Gridsome version, and your Netlify config.yml?
"gridsome": "^0.6.7",
"gridsome-plugin-netlify-cms": "^1.0.9",
"gridsome-plugin-netlify-cms-paths": "^0.3.0",
backend:
name: git-gateway
site_url: https://<site>.netlify.com
accept_roles:
- admin
- editor
media_folder: static/assets
public_folder: assets
collections:
- label: "Pages"
name: "pages"
files:
- file: "content/pages/home/index.md"
label: "Home"
name: "home"
fields:
- { label: "Template Key", name: "templateKey", widget: "hidden", default: "home-page" }
...
In general it works absolutely fine, I can login etc. It is just the first time after setting a new password (as a newly registered user) that it shows that error.
@thetre97 Ah, gotcha. Maybe that's why I'm struggling to reproduce it on 1.0.9. I'll try to get a test repo set up in the next couple of days. Thanks!
I have the same issue.
This is caused by https://github.com/gethypervisual/gridsome-plugin-netlify-cms/blob/master/gridsome.client.js (for which the '__PATH_PREFIX__') does not get injected.
As a workaround, I have added the following to my gridsome.config.js
file:
configureWebpack: {
plugins: [
new DefinePlugin({
__PATH_PREFIX__: JSON.stringify("") // or whatever value you actually need
})
]
},
Describe the bug When I log in my Netlify CMS with Netlify Identity, I got the error
__PATH_PREFIX__ is not defined
and the cms doen'st redirect me to cms's page.To Reproduce
Expected behavior Redirect to
/admin/
pageScreenshots
Applicable Versions:
CMS configuration
Additional context I'm using Gridsome, this is my configs: