# Fix Laravel Unable to Locate File in Vite Manifest Error

> Resolve the Vite manifest error in Laravel by running npm install and npm run dev to build frontend assets, with steps for development and production

**URL:** https://sentry.io/answers/how-do-i-fix-the-laravel-error-unable-to-locate-file-in-vite-manifest-resources-css/

---

## The Problem

Even though you can run and browse your Laravel application, on certain pages you might encounter an error like this:

```
Unable to locate file in Vite manifest: resources something.css
```

The error occurs because you have not built and run the frontend code correctly. While you will not get this error running a default Laravel installation, if you add an extra package like Livewire or Jetstream your JavaScript and CSS dependencies will change.

Your `vite.config.js` file will probably have a line for the file that matches the error you get, such as `input: ['resources/css/app.css', 'resources/js/app.js']`.

## The Solution

The solution to this problem is to download and build the JavaScript code. Ensure that npm is installed on your computer and in a terminal in your project folder, run:

```shell
npm install
npm run dev
```

The commands above will install JavaScript modules and make them available to the browser. You still need to run the PHP server to browse your project:

```shell
php artisan serve
```

These commands are useful when running in development so code changes are available to the browser by the hot-reload servers. However, when running in production, rather run the command below to bundle all your frontend code:

```shell
npm run build
```

This command runs `vite build` that bundles your assets into the `public/build` folder. There is no need for the Vite or Artisan dev server because your production machine will make everything available to the browser through the Apache web server.

## Further Reading

If you have difficulty getting Vite to run, read our [article on the manifest](https://sentry.io/answers/how-do-i-fix-the-laravel-error-vite-manifest-not-found/).

---

*Source: [sentry.io/answers/how-do-i-fix-the-laravel-error-unable-to-locate-file-in-vite-manifest-resources-css/](https://sentry.io/answers/how-do-i-fix-the-laravel-error-unable-to-locate-file-in-vite-manifest-resources-css/)*
