# HMR hot-update.json found but giving me CORS error - WSL2

**URL:** https://discourse.roots.io/t/hmr-hot-update-json-found-but-giving-me-cors-error-wsl2/24738
**Category:** bud
**Tags:** bud, webpack
**Created:** 2023-02-06T14:21:05Z
**Posts:** 3

## Post 1 by @frizzant — 2023-02-06T14:21:05Z

I have built a few templates with bud.js now, recently with the new versions after ~6.6.9 (somewhere around there) I am having HMR issues.  
I am getting cross origin errors.

_I am on **Windows 11** with **WSL2**. Everything works flawlessly on older versions in other projects._

Host: [http://localhost/myTemplate](http://localhost/myTemplate)  
Dev: Host: [http://localhost:3000/myTemplate](http://localhost:3000/myTemplate)  
BudJS: 6.9.0

```
[myTemplate] built in 763ms
localhost/:1 Access to fetch at 'http://localhost/myTemplate/wp-content/themes/wptheme.myTemplate/dist/app.ebc0a3543555f706b65e.hot-update.json' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
```

I get the “green” dot of refresh confirmation on the bottom left of the browser. When I manually reload, everything is there, however it cannot get the individual HRM updates.

```
/**
 * Build configuration for bud.js
 * @param {import('@roots/bud').Bud} bud
 */
export default async bud => {
	/**
	 * The bud instance
	 */
	bud
		.when(
			bud.isProduction,
			() => bud.hash().minimize(),
		)
		/**
		 * Set the project source directory
		 */
		.setPath(`@src`, `sources`)

		/**
		 * Set the application entrypoints
		 * These paths are expressed relative to the `@src` directory
		 */
		.entry({
			app: [`scripts/app.js`, `styles/app.scss`], // [`./sources/scripts/app.js`, `./sources/styles/app.scss`]
			editor: [`scripts/editor.js`, `styles/editor.scss`],
		})

		/**
		 * Copy static assets from `sources/static` to `dist/static`
		 */
		.assets({
			from: bud.path(`@src/static`),
			to: bud.path(`@dist/static`),
		})

               / **I tried lots of different combinations here** /
		.proxy()
		.serve({
			host: 'localhost',
			port: 3000
		})

}
```

---

## Post 2 by @strarsis — 2023-02-06T20:41:45Z

:thinking: Doesn’t `bud` `dev` also list an external proxy IP? If you use that, does this fix the CORS issue?

---

## Post 3 by @frizzant — 2023-02-06T21:33:25Z

interestingly, it just forwards me to the local URL. So no, it does not fix it.
