jsverse / transloco-keys-manager

🦄 The Key to a Better Translation Experience

Home Page:https://github.com/jsverse/transloco/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug: yarn i18n:extract -> TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined

ecappa opened this issue · comments

Is there an existing issue for this?

  • I have searched the existing issues

Is this a regression?

Yes

Current behavior

Try to launch 'yarn i18n:extract', node crash with error - never did ever, never could work (tried w/ yarn and node run)

node:internal/validators:119
    throw new ERR_INVALID_ARG_TYPE(name, 'string', value);
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at new NodeError (node:internal/errors:371:5)
    at validateString (node:internal/validators:119:11)
    at Object.resolve (node:path:1098:7)
    at o (/home/eric/devRoot/appcommunity/node_modules/@ngneat/transloco-keys-manager/utils/path.utils.js:1:1538)
    at Array.map (<anonymous>)
    at resolveConfigPaths (/home/eric/devRoot/appcommunity/node_modules/@ngneat/transloco-keys-manager/utils/path.utils.js:1:1581)
    at resolveConfig (/home/eric/devRoot/appcommunity/node_modules/@ngneat/transloco-keys-manager/utils/resolve-config.js:1:1127)
    at buildTranslationFiles (/home/eric/devRoot/appcommunity/node_modules/@ngneat/transloco-keys-manager/keys-builder/index.js:1:513)
    at Object.<anonymous> (/home/eric/devRoot/appcommunity/node_modules/@ngneat/transloco-keys-manager/index.js:2:1008)
    at Module._compile (node:internal/modules/cjs/loader:1095:14) {
  code: 'ERR_INVALID_ARG_TYPE'
}

Expected behavior

Should extract keys ??

Please provide a link to a minimal reproduction of the bug

n/a

Transloco Config

module.exports = {
    "langs": [
        "fr",
        "en",
        "nl",
        "it"
    ],
    "rootTranslationsPath": "src/assets/i18n/",
};

Debug Logs

No response

Please provide the environment you discovered this bug in

Transloco: 4.0
Transloco Keys Manager: 3.4.1
Angular: 13.3.2
Node: 17
Package Manager: Yarn
OS: Ubuntu

Additional context

Tried to DEBUG=* config seems coherent.

I would like to make a pull request for this bug

Yes solved here : #134

Do know why nobody else had this issue, I patched in #134 the undefined received and now works fine.