Error on gatsby build command : WebpackError: TypeError: Endpoint URL must start with `http:` or `https:`.
divyesh-frodobots opened this issue · comments
Description
i am getting Error on gatsby build command
WebpackError: TypeError: Endpoint URL must start with http:
or https:
.
function assertEndpointUrl(putativeUrl) {
4336 | if (/^https?:/.test(putativeUrl) === false) {
> 4337 | throw new TypeError('Endpoint URL must start with `http:` or `https:`.');
| ^
4338 | }
4339 | return putativeUrl;
4340 | }
Steps to Reproduce
run gatsby build
Expected Result
should success
Actual Result
WebpackError: TypeError: Endpoint URL must start with http:
or https:
.
Environment
mac OS
node 18
"gatsby": "^5.12.4",
@divyesh-frodobots
Check if your gatsby-config.js site url contains valid http link.
module.exports = {
siteMetadata: {
siteUrl: `https://www.example.com`,
...
}
...
}