Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

RollupError in Nuxt 4 module.

Đang mở
#665 5 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
node.js, rollup, typescript
Lĩnh vực
build-system

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện bản build Nuxt 4 trong playground nuxt-openAPI-wrapper được liên kết và kiểm tra entry point .nuxt/openapi-wrapper/index.ts đã tạo. Đọc lỗi của rollup-plugin-inject và so sánh các đường dẫn build của Nuxt 3 và Nuxt 4. Được xem là hoàn tất khi bản build của playground hoàn thành mà không có RollupError đã báo cáo.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
TypeScript
Star
277
Fork
36
Merge trung bình
2 giờ 46 phút
Pull request đã merge (30 ngày)
2

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của nuxt/module-builder

Tất cả issue của nuxt/module-builder

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.