bud
bud copied to clipboard
[bug] watch/build doesn't work after update.
Agreement
- [X] This is not a duplicate of an existing issue
- [X] I have read the guidelines for Contributing to Roots Projects
- [X] This is not a personal support request that should be posted on the Roots Discourse community
Describe the issue
watch/build doesn't work after updating to latest version. the
Expected Behavior
watch/build compiling and staring dev server.
Actual Behavior
Just stuck
Steps To Reproduce
- run yarn build
version
6.4.1
What package manager are you using?
yarn
version
1.22.19
Logs
No response
Configuration
// @ts-check
/**
* Build configuration
*
* @see {@link https://bud.js.org/guides/getting-started/configure}
* @param {import('@roots/bud').Bud} app
*/
export default async (app) => {
app
/**
* Application entrypoints
*/
.entry({
app: ["@scripts/app", "@styles/app"],
editor: ["@scripts/editor", "@styles/editor"],
})
/**
* Directory contents to be included in the compilation
*/
.assets(["images", "fonts", "theme"])
/**
* Matched files trigger a page reload when modified
*/
.watch(["resources/views/**/*", "app/**/*"])
/**
* Proxy origin (`WP_HOME`)
*/
.proxy("https://foo.test")
/**
* Development origin
*/
.serve("http://foo.test:3000")
/**
* URI of the `public` directory
*/
.setPublicPath("/app/themes/codesome/public/");
};
Relevant .budfiles
No response
- what is the output of
yarn bud doctor
? - what about verbose logging
yarn bud build -vvvv
? don't need the full output; just looking for any extra information. - what are your project dependencies/devDependencies?
Everything yarn bud *
related refuses to run, it's hanging to be clear, I have a node process wich uses 100% CPU.
Tried to delete node_modules ant lock.
"devDependencies": {
"@roots/bud": "6.4.1",
"@roots/bud-tailwindcss": "6.4.1",
"@roots/sage": "6.4.1",
"hamburgers": "^1.2.1",
"swiper": "^8.4.2"
},
"dependencies": {
"@tailwindcss/forms": "^0.5.3",
"@tailwindcss/typography": "^0.5.7",
"postcss": "^8.4.16"
}
node -v
?
Node v16.17.0
also tried with v16.16
Everything working with bud version 6.3.5
Just tried with NPM, and it seems working with some warnings:
However resolving that warning and trying to yarn build
resulted in same problem, yarn stuck and node consuming 100% CPU.
So the workaround currently is to use NPM instead of yarn or downgrade to bud v 6.3.5
with npm
can you:
- run
bud build --debug
- open
.budfiles/sage/webpack.config.dump
- search for
postcss
and post the matching rule
the object should look something like this:
Object {
"ident": "postcss",
"loader": "[rootPath]/node_modules/postcss-loader/dist/cjs.js",
"options": Object {
"postcssOptions": Object {
"plugins": Array [
"[rootPath]/node_modules/postcss-import/index.js",
"[rootPath]/node_modules/tailwindcss/nesting/index.js",
"[rootPath]/node_modules/tailwindcss/lib/index.js",
Array [
"[rootPath]/node_modules/postcss-preset-env/dist/index.cjs",
Object {
"features": Object {
"focus-within-pseudo-class": false,
},
"stage": 1,
},
],
],
},
"sourceMap": true,
},
}
Object {
"ident": "postcss",
"loader": "/Users/rd/Sites/xxx/web/app/themes/codesome/node_modules/postcss-loader/dist/cjs.js",
"options": Object {
"postcssOptions": Object {
"plugins": Array [
"/Users/rd/Sites/xxx/web/app/themes/codesome/node_modules/postcss-import/index.js",
"/Users/rd/Sites/xxx/web/app/themes/codesome/node_modules/tailwindcss/nesting/index.js",
"/Users/rd/Sites/xxx/web/app/themes/codesome/node_modules/tailwindcss/lib/index.js",
Array [
"/Users/rd/Sites/xxx/web/app/themes/codesome/node_modules/postcss-preset-env/dist/index.cjs",
Object {
"features": Object {
"focus-within-pseudo-class": false,
},
"stage": 1,
},
],
],
},
"sourceMap": true,
},
},
seems correct.
the --log
flag might give more insight with npm
, as well. we might be blocked on this unless you can do a minimal reproduction.
Confirming that bud is no longer building with pnpm either. After a fresh removal of lockfiles and node_modules
and with auto-install-peers=true
, the node_modules directory has none of the necessary bud dependencies (@roots/bud-terser, @roots/bud-plugin-wordpress, etc). The build process fails to import from those dependencies, and won't build.
I finally experienced it (after god knows how many builds in CI..).
I believe I have fixed it as part of #1697.
Specifically the removal of this logger call:
https://github.com/roots/bud/pull/1697/files#diff-a9ad3e31d1118714865b8bd0a1ded58e346e0c94c77e858acdcbbc55f8d70820L130-L133
I have no idea why but this directly follows the logger ready
success message, and the removal of it fixed it for me.
This should be fixed in v6.4.2 by https://github.com/roots/bud/commit/a5dfd7aa48257e2ac5ebad91584a850632ac5721.
Please feel free to reopen this issue if you are still having problems. It is a hard issue to reliably reproduce so I can't be absolutely certain I fixed it.
Confirming that bud is no longer building with pnpm either. After a fresh removal of lockfiles and
node_modules
and withauto-install-peers=true
, the node_modules directory has none of the necessary bud dependencies (@roots/bud-terser, @roots/bud-plugin-wordpress, etc). The build process fails to import from those dependencies, and won't build.
Hey @evankford I was able to get the install and build to work with pnpm by changing the .npmrc file to:
shamefully-hoist=true
strict-peer-dependencies=false
...and removing the auto-install-peers=true
line. On install, it may complain about missing peers but the build / dev works. I can't explain why, but hopefully it does for you too.