Skip to content
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

TypeError: Failed to construct 'URL': Invalid URL #1

Closed
pascalandy opened this issue Jan 12, 2021 · 6 comments
Closed

TypeError: Failed to construct 'URL': Invalid URL #1

pascalandy opened this issue Jan 12, 2021 · 6 comments

Comments

@pascalandy
Copy link

When I run gatsby develop, I get the error TypeError: Failed to construct 'URL': Invalid URL.

My guess is that the URL eduardogomez.io is hard coded somewhere but I don't understand Gatsby enough to debug this.

Screen Shot 2021-01-12 at 10 55 56 AM

Thanks!

@eddiesigner
Copy link
Owner

eduardogomez.io is only hardcoded in siteConfig.js and you should change it as I mentioned it in the Readme: https://github.com/eddiesigner/eduardogomez.io#running

Although that is not related to this issue. This Gatsby theme pulls all the navigation links from the Ghost Admin automatically, if you get this error is because one or more of your links there are invalid URLs, you have to make sure of adding valid URLs in your Ghost Admin.

Btw, I modified that block of code so probably is better if you pull those changes first.

@pascalandy
Copy link
Author

pascalandy commented Jan 18, 2021

EDIT:
https://github.com/eddiesigner/eduardogomez.io/blob/master/src/utils/siteConfig.js

The README should be a bit clearer regard the path of this file.

Finally, configure your desired URL in siteConfig.js, so links (e. g. canonical links) are generated correctly. You can also update other default values, such as postsPerPage in this file.

@pascalandy
Copy link
Author

pascalandy commented Jan 18, 2021

I removed and git cloned again the whole project

config

Screen Shot 2021-01-18 at 9 11 13 AM

same errors

I still see this URL ??
You can now view eduardogomez.io in the browser.

➜  eduardogomez.io git:(master) ✗ gatsby develop --verbose
verbose set gatsby_log_level: "verbose"
verbose set gatsby_executing_command: "develop"
verbose loading local command from: /Volumes/960G/_pascalandy/11_FirePress/Github/random-stuf
f/eddiesigner/eduardogomez.io/node_modules/gatsby/dist/commands/develop.js
verbose running command: develop

verbose Transition to "initializing"
success open and validate gatsby-configs - 0.073s
warn Plugin gatsby-rehype-prismjs is not compatible with your gatsby version 2.25.3 - It
warn Plugin gatsby-transformer-rehype is not compatible with your gatsby version 2.25.3 - It
success load plugins - 0.876s
success onPreInit - 0.029s
success initialize cache - 0.004s
success copy gatsby files - 0.043s
success onPreBootstrap - 0.014s
verbose Transition to "initializingData"
success createSchemaCustomization - 0.021s
verbose Transition to "initializingData" > "sourcingNodes"
verbose Checking for deleted pages
verbose Deleted 0 pages
verbose Found 0 changed pages
success Checking for changed pages - 0.007s
success source and transform nodes - 3.698s
verbose Transition to "initializingData" > "buildingSchema"
success building schema - 0.458s
verbose Transition to "initializingData" > "creatingPages"
info Total nodes: 771, SitePage nodes: 261 (use --verbose for breakdown)
verbose Number of node types: 13. Nodes per type: SitePage: 261, SitePlugin: 45, Site: 1,
success createPages - 0.406s
verbose Checking for deleted pages
verbose Deleted 0 pages
verbose Found 260 changed pages
success Checking for changed pages - 0.003s
verbose Transition to "initializingData" > "creatingPagesStatefully"
success createPagesStatefully - 0.054s
verbose Transition to "initializingData" > "rebuildingSchemaWithSitePage"
success update schema - 0.028s
verbose Transition to "initializingData" > "writingOutRedirects"
success write out redirect data - 0.002s
verbose Transition to "initializingData" > "done"
verbose Transition to "runningPostBootstrap"
success onPostBootstrap - 0.004s
info bootstrap finished - 8.982s
verbose Transition to "runningQueries"
success onPreExtractQueries - 0.002s
success extract queries from components - 0.389s
verbose Transition to "runningQueries" > "waitingPendingQueries"
verbose Transition to "runningQueries" > "writingRequires"
success write out requires - 0.008s
verbose Transition to "runningQueries" > "calculatingDirtyQueries"
verbose Transition to "runningQueries" > "runningStaticQueries"
success run static queries - 0.016s - 1/1 63.15/s
verbose Transition to "runningQueries" > "runningPageQueries"
success run page queries - 0.641s - 152/152 237.02/s
verbose Transition to "runningQueries" > "waitingForJobs"
verbose Transition to "runningQueries" > "done"
verbose Transition to "startingDevServers"
info formatted file at /Volumes/960G/_pascalandy/11_FirePress/Github/random-stuff/eddiesigner
warn develop process needs to be restarted to apply the changes to gatsby-config.js
info formatted file at /Volumes/960G/_pascalandy/11_FirePress/Github/random-stuff/eddiesigner
info formatted file at /Volumes/960G/_pascalandy/11_FirePress/Github/random-stuff/eddiesigner
info formatted file at /Volumes/960G/_pascalandy/11_FirePress/Github/random-stuff/eddiesigner
info formatted file at /Volumes/960G/_pascalandy/11_FirePress/Github/random-stuff/eddiesigner
info formatted file at /Volumes/960G/_pascalandy/11_FirePress/Github/random-stuff/eddiesigner
info formatted file at /Volumes/960G/_pascalandy/11_FirePress/Github/random-stuff/eddiesigner
info formatted file at /Volumes/960G/_pascalandy/11_FirePress/Github/random-stuff/eddiesigner
info formatted file at /Volumes/960G/_pascalandy/11_FirePress/Github/random-stuff/eddiesigner
info formatted file at /Volumes/960G/_pascalandy/11_FirePress/Github/random-stuff/eddiesigner
info formatted file at /Volumes/960G/_pascalandy/11_FirePress/Github/random-stuff/eddiesigner
info formatted file at /Volumes/960G/_pascalandy/11_FirePress/Github/random-stuff/eddiesigner
info formatted file at /Volumes/960G/_pascalandy/11_FirePress/Github/random-stuff/eddiesigner
info formatted file at /Volumes/960G/_pascalandy/11_FirePress/Github/random-stuff/eddiesigner
info formatted file at /Volumes/960G/_pascalandy/11_FirePress/Github/random-stuff/eddiesigner
info formatted file at /Volumes/960G/_pascalandy/11_FirePress/Github/random-stuff/eddiesigner
info eslint fixed file at /Volumes/960G/_pascalandy/11_FirePress/Github/random-stuff/eddiesig
info eslint fixed file at /Volumes/960G/_pascalandy/11_FirePress/Github/random-stuff/eddiesig
info eslint fixed file at /Volumes/960G/_pascalandy/11_FirePress/Github/random-stuff/eddiesig
info eslint fixed file at /Volumes/960G/_pascalandy/11_FirePress/Github/random-stuff/eddiesig
info eslint fixed file at /Volumes/960G/_pascalandy/11_FirePress/Github/random-stuff/eddiesig
info eslint fixed file at /Volumes/960G/_pascalandy/11_FirePress/Github/random-stuff/eddiesig
info eslint fixed file at /Volumes/960G/_pascalandy/11_FirePress/Github/random-stuff/eddiesig
info eslint fixed file at /Volumes/960G/_pascalandy/11_FirePress/Github/random-stuff/eddiesig
info eslint fixed file at /Volumes/960G/_pascalandy/11_FirePress/Github/random-stuff/eddiesig
info eslint fixed file at /Volumes/960G/_pascalandy/11_FirePress/Github/random-stuff/eddiesig
info eslint fixed file at /Volumes/960G/_pascalandy/11_FirePress/Github/random-stuff/eddiesig
info eslint fixed file at /Volumes/960G/_pascalandy/11_FirePress/Github/random-stuff/eddiesig
info eslint fixed file at /Volumes/960G/_pascalandy/11_FirePress/Github/random-stuff/eddiesig
info eslint fixed file at /Volumes/960G/_pascalandy/11_FirePress/Github/random-stuff/eddiesig
info eslint fixed file at /Volumes/960G/_pascalandy/11_FirePress/Github/random-stuff/eddiesig
info eslint fixed file at /Volumes/960G/_pascalandy/11_FirePress/Github/random-stuff/eddiesig
warn develop process needs to be restarted to apply the changes to gatsby-config.js
⠀
You can now view eduardogomez.io in the browser.
⠀
  http://localhost:8000/
⠀
View GraphiQL, an in-browser IDE, to explore your site's data and schema
⠀
  http://localhost:8000/___graphql
⠀
Note that the development build is not optimized.
To create a production build, use gatsby build
⠀
success Building development bundle - 2.108s
verbose Transition to "waiting"
verbose Transition to "waiting" > "committingBatch"
verbose Transition to "waiting" > "rebuild"
verbose Transition to "recreatingPages"
success building schema - 0.357s
verbose Transition to "recreatingPages" > "creatingPages"
warn Non-deterministic routing danger: Attempting to create page: "/writings", but page
"/writings/" already exists
warn Non-deterministic routing danger: Attempting to create page: "/writings/page/2", but
page "/writings/page/2/" already exists
warn Non-deterministic routing danger: Attempting to create page: "/writings/page/3", but
page "/writings/page/3/" already exists
warn Non-deterministic routing danger: Attempting to create page: "/writings/page/4", but
page "/writings/page/4/" already exists
warn Non-deterministic routing danger: Attempting to create page: "/writings/page/5", but
page "/writings/page/5/" already exists
warn Non-deterministic routing danger: Attempting to create page: "/writings/page/6", but
page "/writings/page/6/" already exists
warn Non-deterministic routing danger: Attempting to create page: "/writings/page/7", but
page "/writings/page/7/" already exists
warn Non-deterministic routing danger: Attempting to create page: "/writings/page/8", but
page "/writings/page/8/" already exists
warn Non-deterministic routing danger: Attempting to create page: "/writings/page/9", but
page "/writings/page/9/" already exists
warn Non-deterministic routing danger: Attempting to create page: "/writings/page/10", but
page "/writings/page/10/" already exists
warn Non-deterministic routing danger: Attempting to create page: "/writings/page/11", but
page "/writings/page/11/" already exists
warn Non-deterministic routing danger: Attempting to create page: "/writings/page/12", but
page "/writings/page/12/" already exists
warn Non-deterministic routing danger: Attempting to create page: "/writings/page/13", but
page "/writings/page/13/" already exists
warn Non-deterministic routing danger: Attempting to create page: "/writings/page/14", but
page "/writings/page/14/" already exists
warn Non-deterministic routing danger: Attempting to create page: "/writings/page/15", but
page "/writings/page/15/" already exists
info Total nodes: 773, SitePage nodes: 263 (use --verbose for breakdown)
verbose Number of node types: 13. Nodes per type: SitePage: 263, SitePlugin: 45, Site: 1,
success createPages - 0.288s
verbose Checking for deleted pages
verbose Deleted 0 pages
verbose Found 0 changed pages
success Checking for changed pages - 0.006s
verbose Transition to "recreatingPages" > "rebuildingSchemaWithSitePage"
success update schema - 0.023s
verbose Transition to "recreatingPages" > "done"
verbose Transition to "runningQueries"
success onPreExtractQueries - 0.004s
success extract queries from components - 0.073s
verbose Transition to "runningQueries" > "waitingPendingQueries"
verbose Transition to "runningQueries" > "writingRequires"
success write out requires - 0.003s
verbose Transition to "runningQueries" > "calculatingDirtyQueries"
verbose Transition to "runningQueries" > "runningStaticQueries"
success run static queries - 0.011s - 1/1 88.39/s
verbose Transition to "runningQueries" > "runningPageQueries"
success run page queries - 0.643s - 150/150 233.16/s
verbose Transition to "runningQueries" > "waitingForJobs"
verbose Transition to "runningQueries" > "done"
verbose Transition to "waiting"

Thank you!

@eddiesigner
Copy link
Owner

I see, that's just the name of the project, you can change it in the package.json file.

@eddiesigner
Copy link
Owner

I will close this issue now, please feel free to reopen it if needed.

@pascalandy
Copy link
Author

I give up at this point. Stil can't compile the project :-/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants