Sage 10 on DDEV Bedrock

Anyone know how to fix this one? After running “yarn build” this error keeps showing
bud build

[bud@5.8.7] [bud] › :heavy_multiplication_x: TypeError [ERR_INVALID_URL]: Invalid URL
at new NodeError (node:internal/errors:371:5)
at onParseError (node:internal/url:552:9)
at new URL (node:internal/url:628:5)
at Object.set origin [as origin] ([secure]/node_modules/@roots/bud-preset-wordpress/lib/cjs/extension.js:16:57)
at Object.init ([secure]/node_modules/@roots/bud-preset-wordpress/lib/cjs/extension.js:21:21)
at Object._init ([secure]/node_modules/@roots/bud-framework/lib/cjs/extension/index.js:66:24)
at async Extensions.run ([secure]/node_modules/@roots/bud-extensions/lib/cjs/Extensions/extensions.service.js:122:13)
at async [secure]/node_modules/@roots/bud-extensions/lib/cjs/Extensions/extensions.service.js:166:13
at async Promise.all (index 17)
at async Extensions.booted ([secure]/node_modules/@roots/bud-extensions/lib/cjs/Extensions/extensions.service.js:50:9)

// Heres my bud.config.js
module.exports = async (app) => {
app
/**
* Application entrypoints
*
* Paths are relative to your resources directory
*/
.entry({
app: [‘scripts/app’, ‘styles/app’],
editor: [‘scripts/editor’, ‘styles/editor’],
})

/**
 * These files should be processed as part of the build
 * even if they are not explicitly imported in application assets.
 */
.assets('images')

/**
 * These files will trigger a full page reload
 * when modified.
 */
.watch('resources/views/**/*', 'app/**/*')

/**
 * Target URL to be proxied by the dev server.
 *
 * This should be the URL you use to visit your local development server.
 */
.proxy('https://php8.ddev.site')

/**
 * Development URL to be used in the browser.
 */
.serve('http://0.0.0.0:3000');

};

  • Any stylesheet files that use url(...) in this project?
  • Does it only happen with the https://php8.ddev.site url in bud configuration?
  • Do you have the same issue with a new Sage 10 theme?
  • What node version?
1 Like
  • So far, i don’t have any css that use url(…)

  • It happens in any project whenever Im creating a theme using the Sage10 theme, what do you mean by “new Sage10” ?. I’m following the docs below.

  1. DDEV wordpress

  2. Sage10

  • Im using node version 16

What I meant with “new Sage 10” is that a Sage 10 theme is used without any modifications.
Does such a theme build/watch start correctly? This would exclude possible causes for the error.

Just saw this when I encountered a similar error and worked out a solution that worked for me. In Bedrock’s .env change the recommended WP_HOME=${DDEV_PRIMARY_URL} to the actual url, so in your case WP_HOME='https://php8.ddev.site'