# Bud build error

**URL:** https://discourse.roots.io/t/bud-build-error/21744
**Category:** bud
**Tags:** bud, sage10
**Created:** 2021-11-22T13:43:38Z
**Posts:** 19

## Post 1 by @Al_Sherif_Ahmed_Khal — 2021-11-22T13:43:38Z

Hello , I tried to follow the steps as it in here :

 ![Screenshot 2021-11-22 141721](https://discourse.roots.io/uploads/default/original/2X/5/5b854acf9427732e241da7ac0d42fd39e252108b.png)

> **[GitHub - roots/sage: WordPress starter theme with a modern development workflow](https://github.com/roots/sage)**
>
> WordPress starter theme with a modern development workflow - GitHub - roots/sage: WordPress starter theme with a modern development workflow

master branch , and gives this error :

```
│ ValidationError: Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema. │
│ - configuration[0].resolve.modules[2] should be a non-empty string. │
│ -> Folder name or directory path where to find modules. │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
```

---

## Post 2 by @ben — 2021-11-22T17:29:55Z

@Al_Sherif_Ahmed_Khal please don’t just post an error message without context.

1. What version of Sage are on you on? Have you made any changes?
2. What version of Node are you running?
3. Exactly what commands did you run to get the error you provided?

---

## Post 3 by @ben — 2021-11-22T17:29:59Z



---

## Post 4 by @Al_Sherif_Ahmed_Khal — 2021-11-22T17:42:19Z

1. What version of Sage are on you on? Have you made any changes?  
Sage 10

I used :

`$ composer create-project roots/sage your-theme-name dev-master`

After that :  
`cd your-theme-name`

Then :

```
yarn
```

after that :

`yarn dev`

My node version is : v16.13.0

then this error appears :

 ![Screenshot 2021-11-22 141721](https://discourse.roots.io/uploads/default/original/2X/5/5b854acf9427732e241da7ac0d42fd39e252108b.png)

---

## Post 5 by @ben — 2021-11-22T17:50:10Z



---

## Post 6 by @Al_Sherif_Ahmed_Khal — 2021-11-23T07:36:17Z

I googled for this error but I can’t find any related info ,

---

## Post 8 by @Al_Sherif_Ahmed_Khal — 2021-11-23T08:24:04Z

```
[C:\Users\AlSherif Khalaf\Local Sites\store\app\public\wp-content\themes\new-one] [build] » ✖ TypeError: config.entry(...).resolve is not a function
    at module.exports (C:\Users\AlSherif Khalaf\Local Sites\store\app\public\wp-content\themes\new-one\bud.config.js:20:6)
    at Configuration.<anonymous> (C:\Users\AlSherif Khalaf\Local Sites\store\app\public\wp-content\themes\new-one\node_modules\@roots\bud\lib\cjs\cli\Runner\config\dynamic.config.js:81:23)
    at Generator.next (<anonymous>)
    at C:\Users\AlSherif Khalaf\Local Sites\store\app\public\wp-content\themes\new-one\node_modules\tslib\tslib.js:117:75
    at new Promise (<anonymous>)
    at __awaiter (C:\Users\AlSherif Khalaf\Local Sites\store\app\public\wp-content\themes\new-one\node_modules\tslib\tslib.js:113:16)
    at Configuration.invoke (C:\Users\AlSherif Khalaf\Local Sites\store\app\public\wp-content\themes\new-one\node_modules\@roots\bud\lib\cjs\cli\Runner\config\dynamic.config.js:71:38)
    at Configuration.<anonymous> (C:\Users\AlSherif Khalaf\Local Sites\store\app\public\wp-content\themes\new-one\node_modules\@roots\bud\lib\cjs\cli\Runner\config\dynamic.config.js:33:28)
    at Generator.next (<anonymous>)
    at fulfilled (C:\Users\AlSherif Khalaf\Local Sites\store\app\public\wp-content\themes\new-one\node_modules\tslib\tslib.js:114:62)
[C:\Users\AlSherif Khalaf\Local Sites\store\app\public\wp-content\themes\new-one] [bud.api] » … Executing 6 enqueued functions
[C:\Users\AlSherif Khalaf\Local Sites\store\app\public\wp-content\themes\new-one] [bud.api] » ❯ executing alias [{"@fonts":"C:\\Users\\AlSherif Khalaf\\Local Sites\\store\\app\\public\\wp-content\\themes\\new-one\\resources\\fonts","@images":"C:\\Users\\AlSherif Khalaf\\Local Sites\\store\\app\\public\\wp-content\\themes\\new-one\\resources\\images","@scripts":"C:\\Users\\AlSherif Khalaf\\Local Sites\\store\\app\\public\\wp-content\\themes\\new-one\\resources\\scripts","@styles":"C:\\Users\\AlSherif Khalaf\\Local Sites\\store\\app\\public\\wp-content\\themes\\new-one\\resources\\styles"}]
```

---

## Post 9 by @ben — 2021-11-23T15:44:09Z

I can’t tell, are you trying to build Bud within a WSL instance or not? If not, can you please try from WSL?

---

## Post 10 by @Al_Sherif_Ahmed_Khal — 2021-11-23T16:27:51Z

I will try using WSL

---

## Post 11 by @Al_Sherif_Ahmed_Khal — 2021-11-24T10:51:02Z

Thanks a lot ,  
It is working now fine with little problem

: Error occured while trying to proxy: localhost:3000/

```
[sage] [bud.server] › ✖ [HPM] Error occurred while proxying request localhost:3000/ to http://store.local/ [ECONNREFUSED] (https://nodejs.org/api/errors.html#errors_common_system_errors)
[sage] [bud.server] › ✖ [HPM] Error occurred while proxying request localhost:3000/favicon.ico to http://store.local/ [ECONNREFUSED] (https://nodejs.org/api/errors.html#errors_common_system_errors)
```

my bud.confing.js :

```
/**
 * @typedef {import('@roots/bud').Bud} Bud
 *
 * @param {Bud} config
 */

module.exports = async (config) =>
  config
    /**
     * Application entrypoints
     *
     * Paths are relative to your resources directory
     */
    .entry({
      app: ['scripts/app.js', 'styles/app.css'],
      editor: ['scripts/editor.js', 'styles/editor.css'],
      customizer: 'scripts/customizer.js',
    })

    /**
     * These files should be processed as part of the build
     * even if they are not explicitly imported in application assets.
     */
    .assets(['assets/images'])

    /**
     * These files will trigger a full page reload
     * when modified.
     */
    .watch([
      'tailwind.config.js',
      'resources/views/*.blade.php',
      'app/View/**/*.php',
    ])

    /**
     * Target URL to be proxied by the dev server.
     *
     * This is your local dev server.
     */
    .proxy({target: 'http://store.local'});
```

---

## Post 13 by @strarsis — 2021-11-28T17:30:03Z

I have the same issue, building inside a WSL 2 instance on Linux file system.

```
✖ @roots/bud-postcss manifest cannot be resolved
```

```
rendering dashboard

    ValidationError: Invalid configuration object. Webpack has been initialized using a configuration
    object that does not match the API schema.
     - configuration[0].resolve.modules[4] should be a object { alias?, aliasFields?, byDependency?,
    cache?, cachePredicate?, cacheWithContext?, conditionNames?, descriptionFiles?, enforceExtension?,
    exportsFields?, extensions?, fallback?, fileSystem?, fullySpecified?, importsFields?, mainFields?,
    mainFiles?, modules?, plugins?, preferAbsolute?, preferRelative?, resolver?, restrictions?, roots?,
    symlinks?, unsafeCache?, useSyncFileSystemCalls? }.
       -> Folder name or directory path where to find modules.
```

```
✖ @roots/bud-postcss manifest cannot be resolved
```

Edit: Alright, so in my case I had to install the packages using `yarn`, not `npm`.  
`yarn` installs the packages differently than `npm`.

---

## Post 14 by @mehha — 2021-12-05T10:47:26Z

Running on windows 10, installed packages with yarn

Still this error:

```
ValidationError: Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
 - configuration[0].resolve.modules[2] should be a non-empty string.
   -> Folder name or directory path where to find modules.
```

---

## Post 15 by @strarsis — 2021-12-05T14:06:47Z

Have you removed the `node_modules/` folder before?  
Are you running the build script with `npm` or with `yarn`?

---

## Post 16 by @mehha — 2021-12-05T16:48:29Z

1. yarn - to install packages
2. yarn dev - to run dev but it gives error

node -v 17.2.0 (also tried with 16.3)  
npm -v 8.2.0

have tried deleting node\_modules folder and then yarn again to install modules.  
also tried to install packages with npm install but no luck

---

## Post 17 by @strarsis — 2021-12-05T17:50:18Z

Hm, and you created the Sage 10 theme from latest master (`dev-master`), not a 10\* release tag?

---

## Post 18 by @mehha — 2021-12-05T18:35:36Z

yes

```
composer create-project roots/sage your-theme-name dev-master
```

---

## Post 19 by @ben — 2021-12-05T20:48:11Z

This topic is already solved :sweat_smile:

> [@mehha](#):
>
> Running on windows 10

One really critical piece of information is missing - are you using WSL or not? If you’re not using WSL, then you’re gonna need to use WSL.

If you’re still experiencing this issue with WSL, let’s get a new topic started with more details about your setup please!

---

## Post 20 by @ben — 2021-12-05T20:48:16Z


