Solved! -- Extension Error (setLoader)

No idea what this means or how to fix it. It’s an error i recieve when running NPM run build

 ExtensionError 

✘ Cannot read properties of undefined (reading 'setLoader')

… Thrown by  @roots/bud-sass/resolve-url

→ Documentation https://bud.js.org/docs/extensions

⌂ Originating error 
│ Cannot read properties of undefined (reading 'setLoader')
│
│ BudError: Cannot read properties of undefined (reading 'setLoader')
│     at BudResolveUrl.catch
│ (file:///Users/dan/Local%20Sites/enterprise-centres/app/public/wp-content/themes/tricorn-par
│ ent-theme/node_modules/@roots/bud-framework/lib/extension/index.js:93:30)
│     at async BudResolveUrl._register
│ (file:///Users/dan/Local%20Sites/enterprise-centres/app/public/wp-content/themes/tricorn-par
│ ent-theme/node_modules/@roots/bud-framework/lib/extension/index.js:290:9)
│     at async Extensions.run
│ (file:///Users/dan/Local%20Sites/enterprise-centres/app/public/wp-content/themes/tricorn-par
│ ent-theme/node_modules/@roots/bud-extensions/lib/service/index.js:285:17)
│     at async file:///Users/dan/Local%20Sites/enterprise-centres/app/public/wp-content/themes
│ /tricorn-parent-theme/node_modules/@roots/bud-extensions/lib/service/index.js:299:13
│     at async file:///Users/dan/Local%20Sites/enterprise-centres/app/public/wp-content/themes
│ /tricorn-parent-theme/node_modules/@roots/bud-extensions/lib/service/index.js:298:13
│     at async file:///Users/dan/Local%20Sites/enterprise-centres/app/public/wp-content/themes
│ /tricorn-parent-theme/node_modules/@roots/bud-extensions/lib/service/index.js:298:13
│     at async file:///Users/dan/Local%20Sites/enterprise-centres/app/public/wp-content/themes
│ /tricorn-parent-theme/node_modules/@roots/bud-extensions/lib/service/index.js:298:13
│     at async file:///Users/dan/Local%20Sites/enterprise-centres/app/public/wp-content/themes
│ /tricorn-parent-theme/node_modules/@roots/bud-extensions/lib/service/index.js:298:13
│     at async file:///Users/dan/Local%20Sites/enterprise-centres/app/public/wp-content/themes
│ /tricorn-parent-theme/node_modules/@roots/bud-extensions/lib/service/index.js:298:13


Any help welcome. Thanks

I don’t know if this could help but, did you try to use Yarn instead of NPM the official documentation suggest to use yarn. So I guess it could be a good idea just to try to wrap up the issue and discard the possible errors.

Just be sure to remove the node_modules folder and the package-lock.json

Regards.

1 Like

SOLVED!!

Tbh i’m not sure how i did it, but after some exhaustive searching, the common issues where mismatched versions.

I changed my package.json to include these matching packages and did a reinstall of all packages (npm i), and it worked.

“devDependencies”: {
@roots/bud”: “6.16.1”,
@roots/bud-babel”: “^6.16.1”,
@roots/bud-sass”: “^6.16.1”,
@roots/sage”: “6.16.1”
},

3 Likes