# Bud Dev Hangs but Bud Build works as expected

**URL:** https://discourse.roots.io/t/bud-dev-hangs-but-bud-build-works-as-expected/22387
**Category:** sage
**Tags:** bud, sage10
**Created:** 2022-02-23T18:59:37Z
**Posts:** 15

## Post 1 by @bbuilds — 2022-02-23T18:59:37Z

Fresh install, cloning main branch. Composer deps installed, added acorn as well. yarn install with production set to false. Updated my bud.config with my local URLs.

I run yarn dev and it just hangs on “bud dev” No messages or anything so no idea what it’s hanging on. I have to force quit.

yarn build works just fine though.

How can I see what’s hanging it up?

---

## Post 2 by @strarsis — 2022-02-23T19:35:21Z

`yarn build --no-dashboard` helped me quite a bit with debugging `bud` build-related issues.

---

## Post 3 by @bbuilds — 2022-02-23T19:55:41Z

thanks! unfortunately, it’s not spitting out any extra info and builds accordingly. Build works fine but dev hangs

---

## Post 4 by @bbuilds — 2022-02-23T19:57:43Z

I’ve tried looking at the bug cli command in `node_modules/.bin/bud`. I have a typescript error in there:

`const {BuildCommand, CleanCommand, DevCommand, DoctorCommand, InstallCommand} = require('../lib/cjs/cli/index.js'); cannot find module`

I don’t see a lib folder in my node\_modules root where it’s pointed…

---

## Post 5 by @strarsis — 2022-02-23T20:02:48Z

You mean just invoking `bud`? When I invoke `./node_modules/.bin/bud` from within the theme directory, it works and prints its usage/help message:

```
./node_modules/.bin/bud
Frontend build tools combining the best parts of Symfony Encore and Laravel Mix

VERSION
  @roots/bud/5.1.0 wsl-x64 node-v16.9.1

USAGE
  $ bud [COMMAND]

COMMANDS
  build compile source assets
  clean clean project distributables and caches
  doctor diagnose issues
  install install peer dependencies
  serve compile assets
```

What `node` version are you using? `lts/*`? I use a current `node` `LTS` `v16.9.1`.

Have you ran `npm install` or `yarn install` and it installed without errors?

Edit: `bud doctor` could help, when you got `bud` running of course.

---

## Post 6 by @bbuilds — 2022-02-23T20:18:02Z

So I first tried to install via `yarn install` but it doesn’t download the devDepdencies. So I install instead with `yarn install --production=false` which it downloads the dev dependencies and I can run `yarn build`

I just cleaned out node modules and will show:

`yarn install` only does this:

`❯ yarn install yarn install v1.22.17 info No lockfile found. [1/5] 🔍 Validating package.json... [2/5] 🔍 Resolving packages... warning @roots/bud > @roots/bud-server > webpack-hot-middleware > querystring@0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead. [3/5] 🚚 Fetching packages... [4/5] 🔗 Linking dependencies... warning "@roots/bud > @roots/bud-framework > ts-node@10.5.0" has unmet peer dependency "@types/node@*". warning "@roots/bud > @roots/bud-framework > ts-node@10.5.0" has unmet peer dependency "typescript@>=2.7". warning "@roots/bud > @roots/bud-build > remark-loader@4.0.0" has incorrect peer dependency "remark@^12.0.0 || ^13.0.0". warning "@roots/bud-eslint > @babel/eslint-parser@7.17.0" has unmet peer dependency "@babel/core@>=7.11.0". warning "@roots/bud-eslint > eslint-webpack-plugin@3.1.1" has unmet peer dependency "webpack@^5.0.0". warning "@roots/bud-prettier > eslint-config-prettier@8.4.0" has unmet peer dependency "eslint@>=7.0.0". warning "@roots/bud-prettier > eslint-plugin-prettier@4.0.0" has unmet peer dependency "eslint@>=7.28.0". warning "@roots/bud-stylelint > stylelint-webpack-plugin@3.1.1" has unmet peer dependency "webpack@^5.0.0". warning "@roots/bud-tailwindcss > autoprefixer@10.4.2" has unmet peer dependency "postcss@^8.1.0". warning "@roots/bud-tailwindcss > tailwindcss@3.0.23" has unmet peer dependency "postcss@^8.0.9". warning "@roots/eslint-config > @typescript-eslint/eslint-plugin > tsutils@3.21.0" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta". warning "@roots/sage > @roots/bud-preset-wordpress > @roots/bud-react > @babel/preset-react@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "@roots/sage > @roots/bud-preset-wordpress > @roots/bud-react > @babel/plugin-syntax-jsx@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "@roots/sage > @roots/bud-preset-wordpress > @roots/bud-react > @pmmmwh/react-refresh-webpack-plugin@0.5.4" has unmet peer dependency "webpack@>=4.43.0 <6.0.0". warning "@roots/sage > @roots/bud-preset-wordpress > @roots/bud-react > @babel/preset-react > @babel/plugin-transform-react-jsx@7.17.3" has unmet peer dependency "@babel/core@^7.0.0-0". warning "@roots/sage > @roots/bud-preset-wordpress > @roots/bud-react > @babel/preset-react > @babel/plugin-transform-react-display-name@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "@roots/sage > @roots/bud-preset-wordpress > @roots/bud-react > @babel/preset-react > @babel/plugin-transform-react-jsx-development@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "@roots/sage > @roots/bud-preset-wordpress > @roots/bud-react > @babel/preset-react > @babel/plugin-transform-react-pure-annotations@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "@roots/sage > @roots/bud-preset-wordpress > @roots/bud-babel > babel-loader@8.2.3" has unmet peer dependency "webpack@>=2". warning "@roots/sage > @roots/bud-preset-wordpress > @roots/bud-wordpress-externals > @roots/wordpress-externals-webpack-plugin@5.4.0" has unmet peer dependency "webpack@^5.47.1". warning "@roots/sage > @roots/bud-preset-wordpress > @roots/bud-preset-recommend > @roots/bud-postcss > postcss-loader@6.2.1" has unmet peer dependency "webpack@^5.0.0". warning "@roots/sage > @roots/bud-preset-wordpress > @roots/bud-entrypoints > @roots/entrypoints-webpack-plugin@5.4.0" has unmet peer dependency "webpack@>=5". warning Workspaces can only be enabled in private projects. warning Workspaces can only be enabled in private projects. warning Workspaces can only be enabled in private projects. warning Workspaces can only be enabled in private projects. [5/5] 🔨 Building fresh packages... success Saved lockfile. ✨ Done in 56.07s.`

but i get an empty node\_modules

![Screen Shot 2022-02-23 at 3.07.43 PM](https://discourse.roots.io/uploads/default/original/2X/0/076c480c0424ae73770ab296edabbb4dd8b3d7f0.png)

So then I run `yarn install --production=false`

 ![Screen Shot 2022-02-23 at 3.10.46 PM](https://discourse.roots.io/uploads/default/original/2X/e/ea7ccd56a5212cec44df85100569efe6cb08db5c.png)

no\_modules are there.

I can run `yarn build`

`❯ yarn build  
yarn run v1.22.17  
$ bud build  
[99%] [cache] › begin idle

┌ assets ────────────────────────────────────────────┐  
│ │  
│ name cached hot size │  
│ │  
│ app.521c12.css ✘ ✘ 4.03 kB │  
│ │  
│ runtime.194772.js ✘ ✘ 1.24 kB │  
│ │  
│ editor.7d9b72.js ✘ ✘ 777 bytes │  
│ │  
│ app.11a75b.js ✘ ✘ 631 bytes │  
│ │  
│ manifest.json ✘ ✘ 171 bytes │  
│ │  
│ entrypoints.json ✘ ✘ 162 bytes │  
│ │  
│ wordpress.json ✘ ✘ 33 bytes │  
│ │  
│ editor.31d6cf.css ✘ ✘ 0 bytes │  
│ │  
│ │  
└────────────────────────────────────────────────────┘

[99%] [cache] › shutdown  
[process] › :information_source: info exit  
:sparkles: Done in 26.35s.`

but `yarn dev` gives me nothing. I let it hang there for a solid couple of mins with nothing.

using node 16.13.1 with NVM and NPM 8.1.2

`❯ node -v v16.13.1`

I can run `./node_modules/.bin/bud` just fine

I’m aware this is most likely a user error / weird config on my part but no idea where to look.

---

## Post 7 by @bbuilds — 2022-02-23T20:28:14Z

I dropped some consols into node\_modules/@roots/bud/lib/cjs/cli/commands/dev.js and they all spit out, so it’s running the file. It’s almost whatever is supposed to be serving the files is hanging.

---

## Post 8 by @ben — 2022-02-23T20:35:23Z

It looks like you’re not running the commands in the right directory. You need to run `yarn` commands from the theme root

---

## Post 9 by @ben — 2022-02-23T20:35:29Z



---

## Post 10 by @bbuilds — 2022-02-23T20:39:23Z

Hey, what makes you say that? I am in my theme root… I thought. Yarn Builds works fine and I tested making CSS / JS updates and saw the changes.

But it does seem like to be a weird NPM/Yarn config that pointing me somewhere else

 ![Screen Shot 2022-02-23 at 3.37.43 PM](https://discourse.roots.io/uploads/default/original/2X/2/2ee5ea0916f54710c8f7a94214bcad4fe9ee2914.png)

---

## Post 11 by @ben — 2022-02-23T20:57:02Z

> [@bbuilds](#):
>
> Hey, what makes you say that?

```
❯ yarn install yarn install v1.22.17 info No lockfile found.
```

---

## Post 12 by @bbuilds — 2022-02-23T21:01:35Z

Ill take a further look into my config. I deleted the `yarn.lock` file from my root when I did re-installed which is why it shows that message missing lock file… I am running in the project root and the `--production=false` flag installs the dependencies. I’m not sure where it’s running the command when I run `yarn install` from the project root then.

---

## Post 13 by @bbuilds — 2022-02-23T21:04:22Z

i just pulled the `yarn.lock` from GitHub and tried again. Same issues. Yarn install gives me no depdencies unless i use the production false flags.

---

## Post 14 by @bbuilds — 2022-02-23T21:10:59Z

okay fixed, it was hanging but not showing an error because I had my config set to always be in production `export NODE_ENV=production` when the default is `export NODE_ENV=development` so that’s why it never installed dev dependencies without the flag and breaking the yarn dev command

---

## Post 15 by @ben — 2022-02-23T21:15:40Z


