Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[help]The vue2.7 project installs the components developed by vue-demi and reports an error #197

Open
gongshun opened this issue Sep 15, 2022 · 0 comments

Comments

@gongshun
Copy link

I developed a component library using vue-demi

I wrote the following in my package.json according to the documentation

{
  "dependencies": {
    "vue-demi": "latest"
  },
  "peerDependencies": {
    "@vue/composition-api": "^1.0.0-rc.1",
    "vue": "^2.0.0 || >=3.0.0"
  },
  "peerDependenciesMeta": {
    "@vue/composition-api": {
      "optional": true
    }
  },
}

When others use my component library, it will report an error while he installs dependencies

企业微信截图_ece8408c-aac9-4a32-a800-779421442c70

Presumably because he is using npm 7, I looked at the npm documentation: https://docs.npmjs.com/cli/v8/configuring-npm/package-json#peerdependencies

image

As of npm v7, peerDependencies are installed by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant