comments, seo, analytics, and presets publish ESM that fails to load in Node.js (follow-up to #149)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 62/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- node.js, typescript
- Área
- build-system, release
Línea de trabajo
Start with the tsup.config.ts of comments, seo and analytics to see the bundle: false setting that leaves relative specifiers extensionless, and compare against how #149 fixed translator (same repo, published config is the reference). For presets, read src/plugin.ts (the ../package.json import) and the relative imports in src/components/blocksDrawer/PresetItem/index.tsx and src/components/presetActions/BlockLabelWithPresets/index.tsx. Then run the repro.mjs snippet after building each package; done means all four print OK and tsc passes under node16/nodenext.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Four published ESM packages in this repo (@focus-reactive/payload-plugin-comments, -seo, -analytics, and -presets) cannot be loaded by Node's ESM resolver because their published dist files contain extensionless relative specifiers or a JSON import without type: "json" (the same class of issue #149 fixed for translator).
// repro.mjs
for (const pkg of [
"@focus-reactive/payload-plugin-comments",
"@focus-reactive/payload-plugin-seo",
"@focus-reactive/payload-plugin-analytics",
"@focus-reactive/payload-plugin-presets",
]) {
try {
await import(pkg);
console.log(pkg, "OK");
} catch (err) {
console.log(`${pkg}: ${err.code}: ${err.message.split("\n")[0]}`);
}
}
Run with:
npm install --legacy-peer-deps \
@focus-reactive/[email protected] \
@focus-reactive/[email protected] \
@focus-reactive/[email protected] \
@focus-reactive/[email protected]
node repro.mjs
Actual output:
@focus-reactive/payload-plugin-comments: ERR_MODULE_NOT_FOUND: Cannot find module '.../node_modules/@focus-reactive/payload-plugin-comments/dist/plugin' imported from .../node_modules/@focus-reactive/payload-plugin-comments/dist/index.js
@focus-reactive/payload-plugin-seo: ERR_MODULE_NOT_FOUND: Cannot find module '.../node_modules/@focus-reactive/payload-plugin-seo/dist/plugin' imported from .../node_modules/@focus-reactive/payload-plugin-seo/dist/index.js
@focus-reactive/payload-plugin-analytics: ERR_MODULE_NOT_FOUND: Cannot find module '.../node_modules/@focus-reactive/payload-plugin-analytics/dist/plugin' imported from .../node_modules/@focus-reactive/payload-plugin-analytics/dist/index.js
@focus-reactive/payload-plugin-presets: ERR_IMPORT_ATTRIBUTE_MISSING: Module "file:///.../node_modules/@focus-reactive/payload-plugin-presets/package.json" needs an import attribute of "type: json"
Expected: all four packages resolve and load in Node.js (and type-check cleanly under moduleResolution: "node16" / "nodenext"), matching ab, html-preview, json-form-builder, netlify-deploy, scheduling, translator, and visual-editing.
#149 noted presets as unbundled swc and assumed the tsup-built plugins bundled relative imports away, but comments, seo, and analytics set bundle: false in tsup.config.ts (leaving all 249, 369, and 757 relative JS imports and their .d.ts imports extensionless), while presets has import packageJson from "../package.json" in src/plugin.ts plus extensionless relative imports in src/components/blocksDrawer/PresetItem/index.tsx and src/components/presetActions/BlockLabelWithPresets/index.tsx.
Tested on @focus-reactive/[email protected], @focus-reactive/[email protected], @focus-reactive/[email protected], and @focus-reactive/[email protected] (npm latest), and built from main (b0644fd54) with Node.js v26.13.0.
Credit: https://ucsbplse.github.io/
- Lenguaje dominante
- TypeScript
- Estrellas
- 34
- Forks
- 5
- Merge medio
- 2 d 4 h
- PR fusionados (30 d)
- 41
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
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 focusreactive/payload-plugins
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
focusreactive/payload-plugins#279 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
focusreactive/payload-plugins#263 ·
Los mantenedores suelen responder en 1 día
-
released released on @next
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
focusreactive/payload-plugins#210 · 10 comentarios ·
Los mantenedores suelen responder en 1 día
-
[translator] Re-extract the traversal engine into its own packageQuizá libre de nuevo @SearheiParkhamchuk la tomó hace 41 días y no hay ningún pull request abierto. Abiertochore low priority translator
focusreactive/payload-plugins#203 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
[translator] Open the seam to hosts: export the module type and provenance()Quizá libre de nuevo @SearheiParkhamchuk la tomó hace 41 días y no hay ningún pull request abierto. Abiertoenhancement low priority translator
focusreactive/payload-plugins#202 · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de focusreactive/payload-plugins
Issues similares
-
Amélioration du résumé regAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
MTES-MCT/monitorenv#3257 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
salesforce/sa11y#1022 ·
-
area/web platform/ios type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
anomalyco/opencode#67504 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Kartographer map markers lose their geo: link on non-English wikisPosiblemente ocupada @playlikeboy la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
openzim/mwoffliner#3014 ·
Los mantenedores suelen responder en 1 día
-
Report: Bloomberg HTAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día