Cypress configs are CommonJS under root "type": "module" and will fail to load
Los mantenedores suelen responder en 4 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 82/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- cypress, javascript, node.js
- Área
- testing
Línea de trabajo
Empieza por leer package.json en la raíz y cypress/plugins/index.js para confirmar el conflicto de tipo de módulo descrito en el issue. Comprueba cómo se carga el archivo del plugin de Cypress y, después, elige una de las soluciones sugeridas de una sola línea. Se considera terminado cuando el plugin se carga como una función con la configuración ESM de la raíz; verifícalo con el comando de Node descrito o con una comprobación adecuada de Cypress.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Found while verifying #2221. Not a regression from that PR — it's pre-existing and currently latent, since no CI job runs Cypress.
The problem
Root package.json declares "type": "module" (re-added in f42f6fce, the ESM test-suite migration). That makes Node treat every .js under the repo root as ESM — including cypress/plugins/index.js, which is still CommonJS (module.exports = (on, config) => {...}).
cypress/support/index.js is comments-only today, so it's currently harmless, but it's in the same trap the moment anyone adds code to it.
Verified on development with Node v24.14.0:
$ node -e "console.log(typeof require('./cypress/plugins/index.js'))"
object
require() returns an empty namespace object instead of the exported function, so anything that loads the plugins file the way Cypress does will get a non-function — the same failure #2221 fixes for github-actions/pr-instructions/.
Suggested fix
Pick one, all are one-liners:
- rename
cypress/plugins/index.js→cypress/plugins/index.cjs(what #2221 does), or - add
cypress/package.jsoncontaining{ "type": "commonjs" }to scope the subtree back to CJS, or - relocate the file under a directory that already has a CJS
package.json.
The cypress/package.json route is the more durable one, since it protects future files added under cypress/ automatically.
Not affected — checked already
shared/roles.jsandshared/authorizationUtils.jsalso containmodule.exports, but they're guarded withif (typeof module !== "undefined" && module.exports)and import each other as ESM, so they load correctly either way.backend/has its ownpackage.jsonwith"type": "module".client/has notypefield, so its CJS configs (postcss.config.js,tailwind.config.js,setupProxy.js) are fine.
The only real breakage in the root tree is the Cypress plugins file.
- Lenguaje dominante
- JavaScript
- Estrellas
- 62
- Forks
- 105
- Merge medio
- 2 d 10 h
- PR fusionados (30 d)
- 3
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de hackforla/VRMS
-
complexity: small feature: Infrastructure p-feature: User Permissions role: Front End size: 0.25pt
Dificultad 1/5 Menos de una hora Aptitud para principiantes 68/100
Los mantenedores suelen responder en 4 días
-
Login form inputs lack visible focus indicator for keyboard navigationPosiblemente ocupada @mvanhorn la tomó hace 161 días. AbiertoBug complexity: medium good first issue p-feature: Login role: Front End size: 1pt
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 4 días
-
complexity: medium feature: Login role: devops size: 1pt
Dificultad 2/5 Medio día Aptitud para principiantes 72/100
Los mantenedores suelen responder en 4 días
-
complexity: small p-feature: Onboarding role: Front End size: 0.25pt
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
hackforla/VRMS#2105 · 1 comentario ·
Los mantenedores suelen responder en 4 días
-
WR Add Pull Request Instructions fails at artifact download (401) on its first ever runPosiblemente ocupada @trillium la tomó hace 1 día. AbiertoBug
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
Los mantenedores suelen responder en 4 días
Todos los issues de hackforla/VRMS
Issues similares
-
Code Cleanup Dev Environment
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
ProjectSidewalk/SidewalkWebpage#5699 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
zenstackhq/zenstack#2873 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Jason-Vaughan/TangleClaw#2195 ·
Los mantenedores suelen responder en 1 día
-
Update: freelancermapAbiertopermissions in review update icon/data
Dificultad 2/5 1-3 horas Aptitud para principiantes 69/100
simple-icons/simple-icons#15062 ·
Los mantenedores suelen responder en 1 día
-
[cao] CAO validation findingsAbierto
Dificultad 1/5 1-3 horas Aptitud para principiantes 78/100
githubnext/gh-aw-cao#16664 ·
Los mantenedores suelen responder en 1 día