Sage 10. TypeError: Invalid URL. Code: ERR_INVALID_URL

Created a new project on Sage 10, there was an error after “yarn dev”:
TypeError: Invalid URL
Code: ERR_INVALID_URL

As far as I understood, this had an impact after a fix was made fix(proxy): interceptor and other new features by kellymears · Pull Request #776 · roots/bud · GitHub.

I write a new proxy recording format in bud.config.js and it works.
.proxy ({
url: ‘http: //test.test’,
replace: {
href: true,
window: true,
publicPath: true,
},
});

Do you have a space in your URL? If not, can you please use the proper code formatting to show us your config?

Yes, I haven’t installed the formatting. I didn’t have a space in the url.

At this point I have a build working when I installed the new format that was described in the patch for the new version of bud.

.proxy({
  url: 'http://test.test',
  replace: {
    href: true,
    window: true,
    publicPath: true,
  },
});
1 Like

Whoops - thanks for the report :pray:

Fixed via Fix Bud proxy by retlehs · Pull Request #2890 · roots/sage · GitHub

1 Like

This topic was automatically closed after 42 days. New replies are no longer allowed.