Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config file does not exist: config/i18nextParser.config.js #802

Open
wenny-chang opened this issue Apr 10, 2023 · 0 comments
Open

Config file does not exist: config/i18nextParser.config.js #802

wenny-chang opened this issue Apr 10, 2023 · 0 comments

Comments

@wenny-chang
Copy link

馃悰 Bug Report

It's different console log when different situation.
Config file does not exist: config/i18nextParser.config.js

To Reproduce

When I use const { otherConfig } = require("../devUtils/getAppConfig"); form another file and use the function in the config file, it will show Config file does not exist: config/i18nextParser.config.js

This one will be fine.

module.exports = {
    createOldCatalogs: true,
    defaultNamespace: "common",
    indentation: 2,
    keepRemoved: false,
    lexers: {
        js: ["JsxLexer"], // if you're writing jsx inside .js files, change this to JsxLexer
        ts: ["JsxLexer"],
        jsx: ["JsxLexer"],
        tsx: ["JsxLexer"],
        default: ["JsxLexer"],
    },
    defaultValue: (locale, namespace, key, value) => value || key,
    locales: ["en"],
    sort: true,
    verbose: true,
    namespaceSeparator: false,
    keySeparator: false,
};

But this one will fail and throw [error] Config file does not exist: config/i18nextParser.config.js

const { otherConfig } = require("../devUtils/getAppConfig");
module.exports = {
    createOldCatalogs: true,
    defaultNamespace: otherConfig().defaultNamespace,
    indentation: 2,
    keepRemoved: false,
    lexers: {
        js: ["JsxLexer"], // if you're writing jsx inside .js files, change this to JsxLexer
        ts: ["JsxLexer"],
        jsx: ["JsxLexer"],
        tsx: ["JsxLexer"],
        default: ["JsxLexer"],
    },
    defaultValue: (locale, namespace, key, value) => value || key,
    locales: ["en"],
    sort: true,
    verbose: true,
    namespaceSeparator: false,
    keySeparator: false,
};

Expected behavior

Different namespace will apply to it

Your Environment

  • runtime version: i.e. node v16.19.0
  • i18next version: 22.4.14
  • i18next-parser: 7.7.0,
  • os: Windows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant