You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi guys,
I am really new to Web development, recently I came across with Gatsby and wanted to use cockpit as the CMS for the backend.
After some googling, I found this plugin.
I was a little bit confuse with folder structure however I read the tutorial on Medium, so I have the gatsby folder and cockpit folder separated.
I have start the PHP server with
php -S localhost:8080
And I logged into admin page everything works pretty well.
"@fika/gatsby-source-cockpit" threw an error while running the sourceNodes lifecycle:
BaseUrl config parameter is invalid or there is no internet connection
Error: BaseUrl config parameter is invalid or there is no internet connection
- CockpitService.js:44 CockpitService.validateBaseUrl
[website]/[@fika]/gatsby-source-cockpit/src/CockpitService.js:44:13
warn The @fika/gatsby-source-cockpit plugin has generated no Gatsby nodes. Do you need it?
I hope to find out what's the problem and solution, it is quite an important project for me, hopefully I would get some love from you guys! Thank you very much!
The text was updated successfully, but these errors were encountered:
I see nothing obviously wrong with your configuration. I would recommend adding some console.log statements in CockpitService.validateBaseUrl and log out the error. Maybe we are hiding something relevant there ...
Looks like Cockpit does not support GET request on /api route.
Running the latest version of Cockpit (master branch v0.10.0 on commit 23e3a49e ) on localhost:8080, requestingGET localhost:8080/api?token=COCKPIT_TOKEN will redirect to the Cockpit index page.
When I replaced the validateBaseUrl with this:
async validateBaseUrl() {
try {
await this.fetch('/collections/listCollections', METHODS.GET)
} catch (error) {
throw new Error(
'BaseUrl config parameter is invalid or there is no internet connection'
)
}
}
It works. Since both validateBaseUrl() does not work, I think the simplest solution is eliminating this function altogether.
Hi guys,
I am really new to Web development, recently I came across with Gatsby and wanted to use cockpit as the CMS for the backend.
After some googling, I found this plugin.
I was a little bit confuse with folder structure however I read the tutorial on Medium, so I have the gatsby folder and cockpit folder separated.
I have start the PHP server with
And I logged into admin page everything works pretty well.
for the gatsby-config.js
but I got an error when i do gatsby develop
I hope to find out what's the problem and solution, it is quite an important project for me, hopefully I would get some love from you guys! Thank you very much!
The text was updated successfully, but these errors were encountered: