exposedev / exposedev/expose

[Bug]: herd & expose & npm run dev breaks page

Open
#439 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
PHP
Stars
4.6k
Forks
308
PR merge metrics
No merged PRs in 30d

Description

### System architecture

Mac, Intel (x86)

### PHP Version

PHP 8.3.17 (cli) (built: Feb 14 2025 00:21:15) (NTS)

### Bug description

Stack:
Herd (latest)
Expose (latest)
NPM (10.9.2)

Whenever there is a hickup in expose (fe. network connection error) or expose gets terminated npm run dev is not working anymore because it serves from the wrong source. Example error:

```Access to script at 'https://ljstttpwmggzufge.sharedwithexpose.com/resources/js/Pages/Settings/Billing.vue' from origin 'https://myproject.test' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.```

```GET https://ljstttpwmggzufge.sharedwithexpose.com/@vite/client net::ERR_FAILED 404 (Not Found)```

Restarting npm run dev does fix it.

### Steps to reproduce

Option 1:

1. Run a project with npm run dev, start expose
2. disable network connection and enable again
3. load project

Option 2:
1. Run a project with npm run dev, start expose
2. terminate expose
3. load project

### Relevant log output

```shell

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.