Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

RollupError in Nuxt 4 module.

オープン
#665 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
node.js, rollup, typescript
領域
build-system

調査の方向性

リンクされた nuxt-openAPI-wrapper playground で Nuxt 4 のビルドを再現することから始め、生成された .nuxt/openapi-wrapper/index.ts エントリーポイントを調べてください。rollup-plugin-inject の失敗を読み、Nuxt 3 と Nuxt 4 のビルドパスを比較してください。playground のビルドが報告された RollupError なしで完了すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

needs reproduction
Environment

  • Operating System: Windows_NT
  • Node Version: v24.7.0
  • Nuxt Version: 4.1.1
  • CLI Version: 3.28.0
  • Nitro Version: 2.12.5
  • Package Manager: [email protected]
  • Builder: -
  • User Config: modules, build
  • Runtime Modules: -
  • Build Modules: -

Reproduction

Im trying to update my module (https://github.com/Pentadome/nuxt-openAPI-wrapper/tree/nuxt-4) to Nuxt 4. but after updating, whenever i build the playground, i get this rollup error:

(node:456) [DEP0155] DeprecationWarning: Use of deprecated trailing slash pattern mapping "./" in the "exports" field module resolution of the package at C:\Users\user\repos\nuxt-open-api\nuxt-openapi-wrapper\playground\node_modules\@vue\shared\package.json imported from C:\Users\user\repos\nuxt-open-api\nuxt-openapi-wrapper\playground\node_modules\nuxt\dist\core\runtime\nitro\templates\error-dev.js. Mapping specifiers ending in "/" is no longer supported.
(Use `node --trace-deprecation ...` to show where the warning was created)
[plugin inject] playground/node_modules/.cache/nuxt/.nuxt/openapi-wrapper/index.ts: rollup-plugin-inject: failed to parse C:/Users/user/repos/nuxt-open-api/nuxt-openapi-wrapper/playground/node_modules/.cache/nuxt/.nuxt/openapi-wrapper/index.ts. Consider restricting the plugin to particular files via options.include

 ERROR  RollupError: playground/node_modules/.cache/nuxt/.nuxt/openapi-wrapper/index.ts (1:7): Expected '{', got 'type' (Note that you need plugins to import files that are not JavaScript)                                             nitro 15:44:33  


1: export type * from "C:/Users/user/repos/nuxt-open-api/nuxt-openapi-wrapper/dist/runtime/fetchTypes";
Describe the bug

I did not get this error when building for Nuxt 3.

Additional context

No response

Logs

主要言語
TypeScript
スター
277
フォーク
36
平均マージ
2時間 46分
マージ済み PR(30日)
2

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

nuxt/module-builder のほかの issue

nuxt/module-builder の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。