You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running parser inside a monorepo, it is throwing an error
NODE_OPTIONS='--enable-source-maps --trace-warnings --trace-deprecation' i18next --config i18next-parser.config.js
i18next Parser
--------------
Input:
Output: packages/i18n/src/locales/$LOCALE.json
node:events:497
throw er; // Unhandled 'error' event
^
Error: ENOENT: no such file or directory, stat 'app/packages/testutils/node_modules/.bin/nanoid'
Emitted 'error' event on Transform instance at:
at ReadableState.afterDestroy (app/node_modules/streamx/index.js:500:19)
at Transform._destroy (app/node_modules/streamx/index.js:636:5)
at ReadableState.updateNonPrimary (app/node_modules/streamx/index.js:393:16)
at ReadableState.update (app/node_modules/streamx/index.js:374:71)
at ReadableState.updateReadNT (app/node_modules/streamx/index.js:543:10)
at process.processTicksAndRejections (node:internal/process/task_queues:77:11) {
To Reproduce
try to run this inside a pnpm monorepo
module.exports={input: ['packages/**/src/**/*.{ts,tsx}','!packages/**/*.spec.{ts,tsx}','!packages/**/*.graphql.{ts,tsx}','!**/node_modules/**/*','!**/.bin/**',// Use ! to filter out files or directories// '!app/**/*.spec.{js,jsx}',// '!app/i18n/**',// '!**/node_modules/**',],output: 'packages/i18n/src/locales/$LOCALE.json',contextSeparator: '_',pluralSeparator: '_',namespaceSeparator: false,keySeparator: false,// resetDefaultValueLocale: 'en',resetDefaultValueLocale: null,verbose: true,keepRemoved: false,failOnWarnings: false,failOnUpdate: false,createOldCatalogs: false,locales: ['pt-BR','en','es'],indentation: 2,lineEnding: 'lf',defaultNamespace: 'translation',defaultValue: (lng,ns,key)=>{if(process.env.I18N_KEY_DEFAULT==='true'){returnkey;}if(lng==='en'){// Return key as the default value for English languagereturnkey;}// Return the string '__NOT_TRANSLATED__' for other languagesreturn'__STRING_NOT_TRANSLATED__';},lexers: {ts: [{lexer: 'JavascriptLexer',functions: ['t','context.t'],},],tsx: [{lexer: 'JsxLexer',functions: ['t','context.t'],},],},// sort: true,sort: (a,b)=>{if(a>b){return1;}if(a<b){return-1;}return0;},};
Expected behavior
A clear and concise description of what you expected to happen.
it should work
// Paste the expected results here
Your Environment
runtime version: node 20
i18next version: 9
os: Mac, Windows, Linux: mac
The text was updated successfully, but these errors were encountered:
🐛 Bug Report
When running parser inside a monorepo, it is throwing an error
To Reproduce
try to run this inside a pnpm monorepo
Expected behavior
A clear and concise description of what you expected to happen.
it should work
// Paste the expected results here
Your Environment
The text was updated successfully, but these errors were encountered: