Skip to content

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

Description

@gongshun

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions