nuxt-i18n: 6.16.0
nuxt: 2.14.12
Upgrade or install nuxt-i18n.
The lib is expected to work.
It doesn't... (See the issue's title)
This dependency was not found:
* klona/full in ./.nuxt/nuxt-i18n/plugin.main.js
To install it, you can run: npm install --save klona/full
994
Already tried it.
Did not work.
It has nothing to do with caching.
Hello,
Well, if version 6.16.0 was installed then klona would be here, however, it's not found.
Basically could you please run yarn install or npm install? Clearing .nuxt cache might help also.
Thanks!
yarn remove nuxt-i18nyarn add -S nuxt-i18n./node_modules./cache./.nuxtyarn installStill not working.
klona is present in ./node_modules... but without the _"full"_ directory within it.
Here's klona package.json's exports section.

They reference the export of the _"full"_ directory which contains a js file needed to run nuxt-i18n (since you import that js file in ./.nuxt/nuxt-i18n/plugin.main.js).
The files klona/full/index.mjs and klona/full/index.js are not there in the v6.16.0 of nuxt-i18n, thus it doesn't work.
Check this: https://unpkg.com/browse/[email protected]/
There is something wrong with your system/setup. Possibly with the yarn/npm cache.
I've just spinned up new nuxt app and I can't recreate the problem that you're having.
I think that I have a clue.
Inside ./node_modules/nuxt-i18n there is [email protected].
There is [email protected] at ./node_modules/klona.
Since the file importing klona is ./.nuxt/nuxt-i18n/plugin.main.js, I think that it searches for _"full"_ inside ./node_modules/[email protected] and not ./node_modules/nuxt-i18n/[email protected].
Would that be possible?
Wouldn't peerDependencies solve the whole thing?
I think that I have a clue.
Inside
./node_modules/nuxt-i18nthere is [email protected].
There is [email protected] at./node_modules/klona.Since the file importing klona is
./.nuxt/nuxt-i18n/plugin.main.js, I think that it searches for _"full"_ inside./node_modules/[email protected]and not./node_modules/nuxt-i18n/[email protected].Would that be possible?
Wouldn't peerDependencies solve the whole thing?
I have just reproduced it locally. I've installed [email protected] and after added nuxt-i18n. It throws errors on compile because klona is an older version which doesn't contain full directory https://github.com/lukeed/klona/releases/tag/v2.0.0
I've moved klona to peerDependencies as It's just throwing warning but not installing newer version:
warning " > [email protected]" has unmet peer dependency "klona@^2.0.4".
@rchl what do you think? Should we move to peerDependencies or just keep it as it is.
Basically, it doesn't resolve the issue, @Alphability you need to upgrade your local klona version to ^2.
Thanks!
Since some of nuxt-i18n code runs outside of the package itself I recommend you to install the dependencies needed on the outside as peerDependencies.
That's what they're for if you read yarn or npm documentation.
Those dependencies are not auto-installed.
So, you'll need to tell your users to install them.
Your setup section should just look like this:
# yarn
yarn add nuxt-i18n klona@2
# npm
npm i nuxt-i18n klona@2