RollupError in Nuxt 4 module.
还没有人认领这个 Issue。
评估
- 难度
- 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 内容生成。
描述
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 分钟
- 30 天内合并 PR
- 2
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
nuxt/module-builder 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 68/100
nuxt/module-builder#801 ·
-
enhancement
难度 3/5 1-2 天 新手友好度 48/100
nuxt/module-builder#764 ·
-
难度 3/5 1-2 天 新手友好度 45/100
nuxt/module-builder#754 ·
-
Conflict between folder structure in readme (src/runtime) and TypeScript config (src/module/runtime)可能已有人在做 @dword-design 于 138 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 45/100
nuxt/module-builder#749 ·
-
Tsdown/obuild migration可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 5/5 一周以上 新手友好度 25/100
nuxt/module-builder#726 · 1 条评论 · 1 个 reaction ·
查看 nuxt/module-builder 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
simkimsia/netlify-axi#19 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
subhranshudash13-dotcom/Contribo#74 ·
维护者通常 1 天内回复
-
enhancement frontend good first issue Stellar Wave trivial
难度 2/5 1-3 小时 新手友好度 76/100
Godgift-care/sci-healthcare-frontend#166 · 1 条评论 ·
维护者通常 1 天内回复
-
backend good first issue security Stellar Wave trivial
难度 2/5 1-3 小时 新手友好度 82/100
Godgift-care/sci-healthcare-backend#171 · 1 条评论 ·
维护者通常 1 天内回复