[postcss] Cannot use 'import.meta' outside a module
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 30/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- nodejs, nuxtjs, tailwindcss, vite
- Lĩnh vực
- build-system, frontend
Hướng nghiên cứu
Reproduce the reported error with the Nuxt and Tailwind setup, starting from the failing @nuxtjs/tailwindcss/dist/config.cjs and config-ctx.cjs entry points. Inspect how those files reach the @nuxt/kit import.meta.dev code while processing tailwind.css, then verify that the same setup runs without the import.meta module error.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
When I attempt to run it, it throws an error.
Error {
stack: "[postcss] Cannot use 'import.meta' outside a module\n" +
'at createError (D:/PuYuanhao/project/vpn_client/node_modules/h3/dist/index.mjs:71:15)\n' +
'at D:/PuYuanhao/project/vpn_client/node_modules/@nuxt/vite-builder/dist/index.mjs:423:21)\n' +
'at async processMessage (D:/PuYuanhao/project/vpn_client/node_modules/@nuxt/vite-builder/dist/index.mjs:405:30)',
message: "[postcss] Cannot use 'import.meta' outside a module",
data: {
code: 'VITE_ERROR',
id: '/@fs/D:/PuYuanhao/project/vpn_client/node_modules/@nuxtjs/tailwindcss/node_modules/tailwindcss/tailwind.css',
stack: 'D:\\PuYuanhao\\project\\vpn_client\\node_modules\\@nuxtjs\\tailwindcss\\node_modules\\@nuxt\\kit\\dist\\index.mjs:2244\n' +
' if (!import.meta.dev) {\n' +
' ^^^^\n' +
'\n' +
"SyntaxError: Cannot use 'import.meta' outside a module\n" +
' at new Script (node:vm:117:7)\n' +
' at createScript (node:vm:269:10)\n' +
' at Object.runInThisContext (node:vm:317:10)\n' +
' at evalModule (D:\\PuYuanhao\\project\\vpn_client\\node_modules\\tailwindcss\\node_modules\\jiti\\dist\\jiti.js:1:251724)\n' +
' at jiti (D:\\PuYuanhao\\project\\vpn_client\\node_modules\\tailwindcss\\node_modules\\jiti\\dist\\jiti.js:1:249841)\n' +
' at D:\\PuYuanhao\\project\\vpn_client\\node_modules\\@nuxtjs\\tailwindcss\\dist\\config.cjs:7:13\n' +
' at evalModule (D:\\PuYuanhao\\project\\vpn_client\\node_modules\\tailwindcss\\node_modules\\jiti\\dist\\jiti.js:1:251913)\n' +
' at jiti (D:\\PuYuanhao\\project\\vpn_client\\node_modules\\tailwindcss\\node_modules\\jiti\\dist\\jiti.js:1:249841)\n' +
' at D:\\PuYuanhao\\project\\vpn_client\\node_modules\\@nuxtjs\\tailwindcss\\dist\\config-ctx.cjs:3:16\n' +
' at evalModule (D:\\PuYu'... 90 more characters,
message: "[postcss] Cannot use 'import.meta' outside a module",
},
statusCode: 500,
}
- Ngôn ngữ chính
- TypeScript
- Star
- 1.9k
- Fork
- 193
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của nuxt-modules/tailwindcss
-
bug
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 58/100
nuxt-modules/tailwindcss#1047 ·
-
Version 6Đang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
nuxt-modules/tailwindcss#1042 ·
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
nuxt-modules/tailwindcss#1039 · 2 bình luận ·
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
nuxt-modules/tailwindcss#1034 · 1 bình luận ·
-
post css problem i guessĐang mởbug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
nuxt-modules/tailwindcss#1033 · 1 bình luận ·
Tất cả issue của nuxt-modules/tailwindcss
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
apache/rocketmq-dashboard#6610 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
nextjs-tracking
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 69/100
cloudflare/vinext#3920 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Team:Dashboards
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
elastic/kibana#297299 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
analytics beginner friendly community contributions-welcome good first issue hacktoberfest help wanted up-for-grabs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
affected/v17 affected/v18 area/frontend type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
umbraco/Umbraco-CMS#24186 ·
Maintainer thường phản hồi trong vòng 2 ngày