comments, seo, analytics, and presets publish ESM that fails to load in Node.js (follow-up to #149)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 62/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- node.js, typescript
- 領域
- build-system, release
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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/
- 主要言語
- TypeScript
- スター
- 34
- フォーク
- 5
- 平均マージ
- 2日 4時間
- マージ済み PR(30日)
- 41
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
focusreactive/payload-plugins のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
focusreactive/payload-plugins#279 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
focusreactive/payload-plugins#263 ·
メンテナーはふだん 1 日以内に返信
-
released released on @next
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
focusreactive/payload-plugins#210 · コメント 10 件 ·
メンテナーはふだん 1 日以内に返信
-
[translator] Re-extract the traversal engine into its own package再び着手できるかも @SearheiParkhamchuk が 41 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンchore low priority translator
focusreactive/payload-plugins#203 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
[translator] Open the seam to hosts: export the module type and provenance()再び着手できるかも @SearheiParkhamchuk が 41 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンenhancement low priority translator
focusreactive/payload-plugins#202 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
focusreactive/payload-plugins の issue をすべて見る
似ている issue
-
verified whatsapp
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 6 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 2 日以内に返信
-
openidconnect: option to use client_secret_post (client_id with "-" rejected by LemonLDAP::NG 2.21)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
MTES-MCT/monitorenv#3257 ·
メンテナーはふだん 1 日以内に返信