question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

After updating i18n Ally to v2.6.0, it prompts: No locale file is loaded

See original GitHub issue

Describe the bug

After updating i18n Ally to v2.6.0 version, opening vs code will prompt: No locale files loaded. Probably there is something wrong with your project config.

Extension Version

Vue i18n Ally (v2.6.0)

Framework/i18n package you are using

To Reproduce

If the plugin is updated to v2.6.0, there will be problems

Device Infomation

  • OS: Windows 10
  • Version: 20H2
  • VS Code Version: 1.56.2

Extension Log Go to View -> Output -> i18n Ally, and paste the content below. You should mask any sensitive information

This is the output log of `v2.5.x`:
  🈢 Activated, v2.5.9
  
  ――――――
  
  πŸ’Ό Workspace root changed to "e:\project-admin"
  🌞 Enabled
  🧩 Enabled frameworks: Vue, React
  🧬 Enabled parsers: ts
  
  πŸš€ Initializing loader "e:\project-admin"
  πŸ“‚ Directory structure: dir
  πŸ—ƒ Custom Path Matcher: {locale}/{namespaces}.{ext}
  πŸ—ƒ Path Matcher Regex: /^(?<locale>[\w-_]+)\/(?<namespace>.+)\.(?<ext>ts)$/
  
  πŸ“‚ Loading locales under e:\project-admin\src\locales\lang
	  πŸ“‘ Loading (en) en/test.ts [1621591602000]
	  πŸ“‘ Loading (zh) zh_CN/test.ts [1621591602000]
  
  πŸ‘€ Watching change on e:\project-admin\src\locales\lang
  βœ… Loading finished
  
  ――――――
  
This is the output log of `v2.6.0`:
🈢 Activated, v2.6.0

――――――

πŸ’Ό Workspace root changed to "e:\project-admin"
🌞 Enabled
🧩 Enabled frameworks: Vue, React
🧬 Enabled parsers: ts

πŸš€ Initializing loader "e:\project-admin"
πŸ“‚ Directory structure: dir
πŸ—ƒ Custom Path Matcher: {locale}/{namespaces}.{ext}
πŸ—ƒ Path Matcher Regex: /^(?<locale>[\w-_]+)\/(?<namespace>.+)\.(?<ext>ts)$/

πŸ“‚ Loading locales under e:\project-admin\src\locales\lang
	πŸ“‘ Loading (en) en/test.ts [1621591602000]
		πŸ› Failed to load Error: Command failed: node "c:\Users\Administrator\.vscode\extensions\lokalise.i18n-ally-2.6.0\node_modules\ts-node\dist\bin.js" --dir "e:\project-admin" --transpile-only --compiler-options "{\"importHelpers\":false,\"allowJs\":true,\"module\":\"commonjs\"}" "c:\Users\Administrator\.vscode\extensions\lokalise.i18n-ally-2.6.0\assets\loader.js" "e:\project-admin\src\locales\lang\en\test.ts"
internal/modules/cjs/loader.js:888
  throw err;
  ^

Error: Cannot find module '@tsconfig/node14/tsconfig.json'
Require stack:
- c:\Users\Administrator\.vscode\extensions\lokalise.i18n-ally-2.6.0\node_modules\ts-node\dist\tsconfigs.js
- c:\Users\Administrator\.vscode\extensions\lokalise.i18n-ally-2.6.0\node_modules\ts-node\dist\configuration.js
- c:\Users\Administrator\.vscode\extensions\lokalise.i18n-ally-2.6.0\node_modules\ts-node\dist\index.js
- c:\Users\Administrator\.vscode\extensions\lokalise.i18n-ally-2.6.0\node_modules\ts-node\dist\repl.js
- c:\Users\Administrator\.vscode\extensions\lokalise.i18n-ally-2.6.0\node_modules\ts-node\dist\bin.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:885:15)
    at Function.Module._load (internal/modules/cjs/loader.js:730:27)
    at Module.require (internal/modules/cjs/loader.js:957:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.getDefaultTsconfigJsonForNodeVersion (c:\Users\Administrator\.vscode\extensions\lokalise.i18n-ally-2.6.0\node_modules\ts-node\dist\tsconfigs.js:18:24)
    at Object.readConfig (c:\Users\Administrator\.vscode\extensions\lokalise.i18n-ally-2.6.0\node_modules\ts-node\dist\configuration.js:87:55)
    at create (c:\Users\Administrator\.vscode\extensions\lokalise.i18n-ally-2.6.0\node_modules\ts-node\dist\index.js:169:83)
    at Object.register (c:\Users\Administrator\.vscode\extensions\lokalise.i18n-ally-2.6.0\node_modules\ts-node\dist\index.js:136:21)
    at main (c:\Users\Administrator\.vscode\extensions\lokalise.i18n-ally-2.6.0\node_modules\ts-node\dist\bin.js:119:29)
    at Object.<anonymous> (c:\Users\Administrator\.vscode\extensions\lokalise.i18n-ally-2.6.0\node_modules\ts-node\dist\bin.js:293:5) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'c:\\Users\\Administrator\\.vscode\\extensions\\lokalise.i18n-ally-2.6.0\\node_modules\\ts-node\\dist\\tsconfigs.js',
    'c:\\Users\\Administrator\\.vscode\\extensions\\lokalise.i18n-ally-2.6.0\\node_modules\\ts-node\\dist\\configuration.js',
    'c:\\Users\\Administrator\\.vscode\\extensions\\lokalise.i18n-ally-2.6.0\\node_modules\\ts-node\\dist\\index.js',
    'c:\\Users\\Administrator\\.vscode\\extensions\\lokalise.i18n-ally-2.6.0\\node_modules\\ts-node\\dist\\repl.js',
    'c:\\Users\\Administrator\\.vscode\\extensions\\lokalise.i18n-ally-2.6.0\\node_modules\\ts-node\\dist\\bin.js'
  ]
}

	πŸ“‘ Loading (zh) zh_CN/test.ts [1621591602000]
		πŸ› Failed to load Error: Command failed: node "c:\Users\Administrator\.vscode\extensions\lokalise.i18n-ally-2.6.0\node_modules\ts-node\dist\bin.js" --dir "e:\project-admin" --transpile-only --compiler-options "{\"importHelpers\":false,\"allowJs\":true,\"module\":\"commonjs\"}" "c:\Users\Administrator\.vscode\extensions\lokalise.i18n-ally-2.6.0\assets\loader.js" "e:\project-admin\src\locales\lang\zh_CN\test.ts"
internal/modules/cjs/loader.js:888
  throw err;
  ^

Error: Cannot find module '@tsconfig/node14/tsconfig.json'
Require stack:
- c:\Users\Administrator\.vscode\extensions\lokalise.i18n-ally-2.6.0\node_modules\ts-node\dist\tsconfigs.js
- c:\Users\Administrator\.vscode\extensions\lokalise.i18n-ally-2.6.0\node_modules\ts-node\dist\configuration.js
- c:\Users\Administrator\.vscode\extensions\lokalise.i18n-ally-2.6.0\node_modules\ts-node\dist\index.js
- c:\Users\Administrator\.vscode\extensions\lokalise.i18n-ally-2.6.0\node_modules\ts-node\dist\repl.js
- c:\Users\Administrator\.vscode\extensions\lokalise.i18n-ally-2.6.0\node_modules\ts-node\dist\bin.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:885:15)
    at Function.Module._load (internal/modules/cjs/loader.js:730:27)
    at Module.require (internal/modules/cjs/loader.js:957:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.getDefaultTsconfigJsonForNodeVersion (c:\Users\Administrator\.vscode\extensions\lokalise.i18n-ally-2.6.0\node_modules\ts-node\dist\tsconfigs.js:18:24)
    at Object.readConfig (c:\Users\Administrator\.vscode\extensions\lokalise.i18n-ally-2.6.0\node_modules\ts-node\dist\configuration.js:87:55)
    at create (c:\Users\Administrator\.vscode\extensions\lokalise.i18n-ally-2.6.0\node_modules\ts-node\dist\index.js:169:83)
    at Object.register (c:\Users\Administrator\.vscode\extensions\lokalise.i18n-ally-2.6.0\node_modules\ts-node\dist\index.js:136:21)
    at main (c:\Users\Administrator\.vscode\extensions\lokalise.i18n-ally-2.6.0\node_modules\ts-node\dist\bin.js:119:29)
    at Object.<anonymous> (c:\Users\Administrator\.vscode\extensions\lokalise.i18n-ally-2.6.0\node_modules\ts-node\dist\bin.js:293:5) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'c:\\Users\\Administrator\\.vscode\\extensions\\lokalise.i18n-ally-2.6.0\\node_modules\\ts-node\\dist\\tsconfigs.js',
    'c:\\Users\\Administrator\\.vscode\\extensions\\lokalise.i18n-ally-2.6.0\\node_modules\\ts-node\\dist\\configuration.js',
    'c:\\Users\\Administrator\\.vscode\\extensions\\lokalise.i18n-ally-2.6.0\\node_modules\\ts-node\\dist\\index.js',
    'c:\\Users\\Administrator\\.vscode\\extensions\\lokalise.i18n-ally-2.6.0\\node_modules\\ts-node\\dist\\repl.js',
    'c:\\Users\\Administrator\\.vscode\\extensions\\lokalise.i18n-ally-2.6.0\\node_modules\\ts-node\\dist\\bin.js'
  ]
}


πŸ‘€ Watching change on e:\project-admin\src\locales\lang
βœ… Loading finished

Screenshots

This is my project structure:

)G{MTL_QMQW%$92`299N3EC

This is my `settings.json` configuration:
  "i18n-ally.localesPaths": ["src/locales/lang"],
  "i18n-ally.keystyle": "nested",
  "i18n-ally.sortKeys": true,
  "i18n-ally.namespace": true,
  "i18n-ally.pathMatcher": "{locale}/{namespaces}.{ext}",
  "i18n-ally.enabledParsers": ["ts"],
  "i18n-ally.sourceLanguage": "en",
  "i18n-ally.enabledFrameworks": ["vue", "react"]
This is my `i18n Ally` plugin panel of `v2.5.x`:

%R~$7`TLJ%(HO)LT7GQR7(W

This is my `i18n Ally` plugin panel of `v2.6.0`:

Q)H$(%Q%~BE%%IF ~3BQ6S

This is the project application code of `v2.5.x` version:

6A E7~Y}VYL$X3A1D4(_P60

This is the project application code of `v2.6.0` version:

V~0AZ7 6EHI2FQG$72}7Y1N

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:4
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
jiangmaniucommented, May 31, 2021

No changes anywhere, just roll back the plugin to v2.5.9 and it will work normally

2reactions
iperiagocommented, May 29, 2021

exact same issue here, must be some undocumented breaking change in 2.6.0, please fix

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to configure `I18n Ally` VsCode plugin to read my locals ...
Author of i18n Ally here. Currently, we don't support the locale code as top-level keys in json files. I'd suggest using the followingΒ ......
Read more >
MicroStrategy Office User Guide
This guide is intended for several types of users, including business users who will use MicroStrategy Office to design Excel workbooks, PowerPoint.
Read more >
Manual: Emerson Wireless 1420 Gateway
The Gateway collects the configuration date and when the file download pop up appears, select Save. 4. Enter a save location and file...
Read more >
The Ultimate Guide to Angular Localization | Phrase
It's no surprise that Angular has robust built-in i18n support. ... We need to include the path to a translation file for each...
Read more >
Upgrade Instructions for Web Filter & Security, v8.1.x
Step 2: Prepare appliances for upgrade (appliance-only), page 6 ... After the upgrade is complete, Filtering Service can be restarted with any locale....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found