i18next / i18next-fs-backend

i18next-fs-backend is a backend layer for i18next using in Node.js and for Deno to load translations from the filesystem.
MIT License
97 stars 17 forks source link

Deno 2.0 no longer supports .cjs module #52

Open NyaightHazard opened 4 hours ago

NyaightHazard commented 4 hours ago

🐛 Bug Report

Deno 2.0 cannot import i18next_fs_backend.

error: Expected a JavaScript or TypeScript module, but identified a Cjs module. Importing these types of modules is currently not supported.
  Specifier: https://deno.land/x/i18next_fs_backend@v2.3.2/lib/fs.cjs
    at https://deno.land/x/i18next_fs_backend@v2.3.2/lib/readFile.js:4:24

see also https://github.com/denoland/deno/issues/26503

To Reproduce

import i18next_fs_backend with Deno 2.0+

import Backend from "https://deno.land/x/i18next_fs_backend@v2.3.2/index.js";

Your Environment

adrai commented 2 hours ago

Sorry, that's not possible to remove... since it is used also on non-deno environments... we would need to drop the support for cjs completely... Maybe this will land sooner or later...