Skip to content
This repository has been archived by the owner on Jul 4, 2021. It is now read-only.

fix: move debug to dependencies, add vite peer dependency #77

Merged
merged 1 commit into from
Mar 16, 2021
Merged

fix: move debug to dependencies, add vite peer dependency #77

merged 1 commit into from
Mar 16, 2021

Conversation

lukashass
Copy link
Contributor

Here is another fix for using @intlify/vite-plugin-vue-i18n with yarn 2.

When starting vite I get:

Error: @intlify/vite-plugin-vue-i18n tried to access debug, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

Required package: debug (via "debug")
Required by: @intlify/vite-plugin-vue-i18n@npm:2.0.2 (via ./.yarn/cache/@intlify-vite-plugin-vue-i18n-npm-2.0.2-157305a34b-3e7108929e.zip/node_modules/@intlify/vite-plugin-vue-i18n/lib/)

and

Error: @intlify/vite-plugin-vue-i18n tried to access vite, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

Required package: vite (via "vite")
Required by: @intlify/vite-plugin-vue-i18n@npm:2.0.2 (via ./.yarn/cache/@intlify-vite-plugin-vue-i18n-npm-2.0.2-157305a34b-3e7108929e.zip/node_modules/@intlify/vite-plugin-vue-i18n/lib/)

I moved debug to dependencies and listed vite as peerDependency as per the yarn rulebook.

I just copied the vite version from devDependencies, although I'm pretty sure it works with lower versions, too (I'm still using vite@2.0.0-beta.55 and it seems to work just fine).
My understanding is that it is best to define the lowest supported version as peerDependency, but I don't know which one that actually is.

Copy link
Member

@kazupon kazupon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Improvement Includes backwards-compatible fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants