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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 task done
ecappa opened this issue May 10, 2022 · 1 comment

Comments

@ecappa
Copy link

ecappa commented May 10, 2022

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

@ecappa
Copy link
Author

ecappa commented May 18, 2022

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

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

2 participants