API Tokens page in Global Settings giving error
---
name: 🐛 Bug Report
about: Create a report to help us improve Strapi.
---

<!--
Hello 👋 Thank you for submitting an issue.

Before you start, please make sure your issue is understandable and reproducible.
To make your issue readable make sure you use valid Markdown syntax.

https://guides.github.com/features/mastering-markdown/

Please ensure you have also read and understand the contributing guide.

https://github.com/strapi/strapi/blob/main/CONTRIBUTING.md#reporting-an-issue
-->

## Bug report

### Required System information

<!-- Please ensure you are using the Node LTS version (18, 20, or 22) -->
<!-- Strapi v3 is no longer supported, please update to Strapi v4 -->
<!-- If you are reporting a frontend bug please provide error logs after setting STRAPI_ENFORCE_SOURCEMAPS=true in your .env -->
<!-- This environment variable makes frontend errors easier to read and trace -->

- Node.js version: node v22.6.0
- NPM version: 10.8.2
- Strapi version: v5.4.1
- Database: C:\Users\saram\OneDrive\Desktop\Coding\Module 18\cartDb
- Operating system: Windows
- Is your project Javascript or Typescript: Javascript

<!-- Did you know you can run `yarn strapi report` or `npm run strapi report` to get this information easier? -->

### Describe the bug

A clear and concise description of what the bug is.
When in http://localhost:1337/admin/settings when I go to hit global settings -> API tokens I receive an error that opens a new window not allowing me to get a token

The error that shows in my command window is below:
[2024-11-23 15:55:48.019] http: GET /api/products (8 ms) 200
[2024-11-23 15:58:33.968] http: GET /content-manager/content-types (12 ms) 200
The file does not exist at "C:/Users/saram/OneDrive/Desktop/Coding/Module 18/cartDb/node_modules/.strapi/vite/deps/ListView-CDBJ6KxG-HGY76AET.js?v=99c9d719" which is in the optimize deps directory. The dependency might be incompatible with the dep optimizer. Try adding it to `optimizeDeps.exclude`.
[2024-11-23 15:59:04.311] http: GET /admin/settings/api-tokens?sort=name:ASC (6 ms) 200
[2024-11-23 15:59:04.507] http: GET /admin/project-type (3 ms) 200
The file does not exist at "C:/Users/saram/OneDrive/Desktop/Coding/Module 18/cartDb/node_modules/.strapi/vite/deps/ListView-CDBJ6KxG-HGY76AET.js?v=99c9d719" which is in the optimize deps directory. The dependency might be incompatible with the dep optimizer. Try adding it to `optimizeDeps.exclude`. (x2)

![image](https://github.com/user-attachments/assets/b30695d3-035b-4de9-a525-364a05ca02e4)


### Steps to reproduce the behavior

1. Go to Strapi Admin page
2. Click on settings 
3. Scroll down to Global Settings - API Tokens
4. See error:
```
TypeError: Failed to fetch dynamically imported module: http://localhost:1337/node_modules/.strapi/vite/deps/ListView-CDBJ6KxG-HGY76AET.js?v=99c9d719

### Expected behavior

I expected the website to open a window allowing me to get a temporary API token

### Screenshots

![image](https://github.com/user-attachments/assets/09cec3d3-f51b-46b8-9f24-96e571cdf590)
