Skip to content

Installing @roots/bud-sass throws an error #700

@bzx

Description

@bzx

Description

When trying to install bud-sass extension in a Sage 10 theme, it throws an error (actually two different errors depending on the scenario). Unable to continue.

Steps to reproduce

  1. composer create-project roots/sage sage_10 dev-master && cd sage_10 (install Sage 10)
  2. yarn add @roots/bud-sass --dev (install bud-sass extension)
  3. yarn bud init (install its dependencies, as per docs)
  4. yarn build

Expected behavior: [What you expect to happen]
Build should finish with no errors.

Actual behavior: [What actually happens]
Throws an error:

[sage_10.1] [bud.extensions] › ✖ @roots/bud-postcss TypeError: value.bind is not a function
    at [secure]/node_modules/@roots/bud-framework/lib/cjs/Framework/bindMethod.js:27:28
    at Array.map (<anonymous>)
    at Bud.bindMethod ([secure]/node_modules/@roots/bud-framework/lib/cjs/Framework/bindMethod.js:26:32)
    at Controller.<anonymous> ([secure]/node_modules/@roots/bud-extensions/lib/cjs/Controller/controller.service.js:183:22)
    at Generator.next (<anonymous>)
    at fulfilled ([secure]/node_modules/tslib/tslib.js:114:62)
[sage_10.1] [bud.extensions] › ✔ register called @roots/bud-babel
    Error: TypeError: value.bind is not a function
error Command failed with exit code 1.

Reproduces how often: [What percentage of the time does it reproduce?]
Every time.

Additional information

I have tried a different path at step 3, as suggested here.
And so:
3. yarn bud build --install
..throws this error:

[sage_10.1] [bud.extensions] › ✔  @roots/bud-postcss resolved
    Error: Cannot find module '/Users/bzx/Projects/Cyklobazar/bedrock/web/app/themes/sage_10.1/node_modules/@roots/bud-sass/lib/cjs/index.js'
    Code: MODULE_NOT_FOUND

As suggested in the comment, I've tried running yarn install afterwards, which goes fine, but a subsequent yarn build throws the same error as described in Actual Behaviour section.

Metadata

Metadata

Assignees

Labels

@roots/bud-sassbugSomething isn't workingdependenciesPull requests that update a dependency file

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions