Skip to content

Conversation

kellymears
Copy link
Contributor

Type of change

  • PATCH: bugfix

Dependencies added

  • NA

Details

In #700 we have an issue where sass can't be installed using bud install because Bud is attempting to access dependencies (which don't exist) before the install command has a chance to run. similar issues exist in other extensions with peer dependencies. We don't have these issues in the monorepo because our modules are all hoisted.

This PR addresses these issues for @roots/bud-sass, @roots/bud-postcss and @roots/bud-tailwindcss by attempting to resolve the dependencies within try/catch blocks at the start of the extension registration/boot. If something isn't found it exits the callback early which should give the install command time to run.

I imagine this issue exists for other extensions with peer dependency requirements (like @roots/bud-react). Those can be handled separately.

I also made a handful of related changes to framework internals as a part of this work.

@roots/bud-esbuild's api call needs to be updated in order for these
fixes to compile.

Merge branch 'fix-beta-esbuild-extension' into fix-install-errors
@QWp6t QWp6t changed the title Fix: install errors with sass, postcss, tailwindcss fix(bud-install): sass, postcss, tailwindcss Nov 26, 2021
@QWp6t QWp6t merged commit 67fd1e1 into next Nov 26, 2021
@QWp6t QWp6t deleted the fix-install-errors branch November 26, 2021 05:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Installing @roots/bud-sass throws an error fatal error running bud install
2 participants