0

So i've set up my package.json, installed parcel, and everything is working fine. However, when I use terminal and try to load my webpage through parcel or create my build i get errors and I can't seem to find a solution. If anyone could help I'd really appreciate it.

SOLVED I had messed up a tag for open graph.

<meta property="og:image" content="http:// >

Didn't set a source for it so failed to resolve.

❯ parcel index.html

Server running at http://localhost:1234

Build failed.

@parcel/core: Failed to resolve 'http://' from './index.html'

@parcel/resolver-default: Invalid URL

TypeError [ERR_INVALID_URL]: Invalid URL

at new NodeError (node:internal/errors:372:5)

at URL.onParseError (node:internal/url:563:9)

at new URL (node:internal/url:643:5)

at NodeResolver.resolveFilename (/Users/thomas/Desktop/Software Developer Stuff/Code With Mosh/Thomify/node_modules/@parcel/node-resolver-core/lib/NodeResolver.js:520:63)

at NodeResolver.resolveModule (/Users/thomas/Desktop/Software Developer Stuff/Code With Mosh/Thomify/node_modules/@parcel/node-resolver-core/lib/NodeResolver.js:213:28)

at NodeResolver.resolve (/Users/thomas/Desktop/Software Developer Stuff/Code With Mosh/Thomify/node_modules/@parcel/node-resolver-core/lib/NodeResolver.js:141:31)

at Object.resolve (/Users/thomas/Desktop/Software Developer Stuff/Code With Mosh/Thomify/node_modules/@parcel/resolver-default/lib/DefaultResolver.js:54:21)

at ResolverRunner.resolve

Thom H
  • 9
  • 3
  • The errors indicate that parcel is having a hard time resolving something in your `index.html` file - can you post that (or, even better, a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example))? Another tip in the meantime - be sure to remove the `"main": "index.html"` line from your `package.json` unless you are developing a library, which it doesn't sound like you are (see [docs](https://parceljs.org/getting-started/migration/#package.json%23main)) – Andrew Stegmaier Apr 29 '22 at 15:23
  • Please don't paste images of text/errors, etc. Post the actual text – Lee Taylor Apr 29 '22 at 15:55

0 Answers0