Skip to content

[dev] [frontend] missing bootstrap.css.map #1420

@alxndrsn

Description

@alxndrsn

When running npm run dev, and then loading the frontend in a web browser, the following output is shown from vite:

8:50:58 AM vite.1  |  8:50:58 AM [vite] (client) Failed to load source map for /odk/frontend/src/assets/css/bootstrap.css.
8:50:58 AM vite.1  |  Error: An error occurred while trying to read the map file at bootstrap.css.map
8:50:58 AM vite.1  |  Error: ENOENT: no such file or directory, open '/odk/frontend/src/assets/css/bootstrap.css.map'
8:50:58 AM vite.1  |      at async open (node:internal/fs/promises:638:25)
8:50:58 AM vite.1  |      at async Object.readFile (node:internal/fs/promises:1238:14)
8:50:58 AM vite.1  |      at async extractSourcemapFromFile (file:///odk/frontend/node_modules/vite/dist/node/chunks/dep-DBxKXgDP.js:11154:53)
8:50:58 AM vite.1  |      at async loadAndTransform (file:///odk/frontend/node_modules/vite/dist/node/chunks/dep-DBxKXgDP.js:35697:27)

Root cause

bootstrap.css.map is referenced at:

https://github.com/getodk/central-frontend/blob/dd053df9d710b88d49665d0855fd0a7def96fac1/src/assets/css/bootstrap.css#L4738

Fixes

Either:

  1. remove sourceMappingURL reference in src/assets/css/bootstrap.css, or
  2. add bootstrap.css.map alongside bootstrap.css, or
  3. import bootstrap.css at build-time from node_modules, where it's already included (see: [frontend] bootstrap.css maintenance process is not documented #1421).

Background

@sadiqkhoja mentioned this at getodk/central-frontend#1218 (review)

@matthew-white said at getodk/central-frontend#1218 (comment) that it would be filed as an issue.

I can't find any other issue mentioning this file, but there's a chance this is a duplicate issue.

Metadata

Metadata

Assignees

Labels

dxDeveloper workflow, automated checksfrontendRequires a change to the UImaintenanceDependencies, recurring maintenance

Type

No type

Projects

Status

✅ done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions