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.

json messages is empty when use pnpm

See original GitHub issue

https://github.com/intlify/vue-cli-plugin-i18n/blob/fdc4fc04e1e9d3955907b47d9151f50d6530d2dc/index.js#L31

pnpm store package in a different way, so ../../src is not point to project src folder

vue inspect --rule i18n-resource

/* config.module.rule('i18n-resource') */
{
  test: /\.(json5?|ya?ml)$/,
  type: 'javascript/auto',
  include: [
    '${workspaceFolder}\\node_modules\\.pnpm\\vue-cli-plugin-i18n@2.1.0\\src\\locales'
  ],
  use: [
    /* config.module.rule('i18n-resource').use('i18n-resource') */
    {
      loader: '@intlify/vue-i18n-loader'
    }
  ]
}

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
NateScarletcommented, May 17, 2021

workaround:

    config.module
      .rule('i18n-resource')
      .include.clear()
      .add(resolve(__dirname, 'src/locales'));

i18n plugin should search nearest node_modules or use a different default value for pnpm

0reactions
Silbadcommented, Jun 17, 2022

ok I fixed it in the vue.config.js

    chainWebpack: config => {
        config.module
            .rule('i18n-resource')
            .include.clear()
            .add(path.resolve(__dirname, 'src/locales'));
    }

Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Developers - json messages is empty when use pnpm -
json messages is empty when use pnpm. ... pnpm store package in a different way, so ../../src is not point to project src...
Read more >
PNPM_PACKAGE_NAME doesn't seem to be set in exec #4320
json like "check": "pnpm --recursive exec -- echo $PNPM_PACKAGE_NAME", it just outputs empty lines, one for each module. Every module has a name ......
Read more >
pnpm/pnpm - Gitter
Hi! I'm looking for the most simple way to empty a 'node_modules' folder under Windows. Something like pnpm uninstall all (which does not...
Read more >
NPM Install Error:Unexpected end of JSON input while ...
On the other hand, if you're debugging an issue with the installer, you can use npm install --cache /tmp/empty-cache to use a temporary...
Read more >
package.json | pnpm
During local development, pnpm will always fail with an error message if its ... If all projects in the monorepo use the same...
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