vueuse / vue-demi

🎩 Creates Universal Library for Vue 2 & 3
MIT License
2.99k stars 158 forks source link

I was researching the use of VUe-Demi to solve my problems and there was a bit of a problem #114

Closed yinfoyuan closed 2 years ago

yinfoyuan commented 2 years ago

Use with @nuxtjs/ composition-API will appear after publication

 ERROR  Failed to compile with 1 errors                                                                                                       friendly-errors 11:35:29  

This dependency was not found:                                                                                                                friendly-errors 11:35:29  
                                                                                                                                              friendly-errors 11:35:29  
* @vue/composition-api/dist/vue-composition-api.mjs in ./node_modules/vue-demi/lib/index.mjs                                                  friendly-errors 11:35:29  
                                                                                                                                              friendly-errors 11:35:29  
To install it, you can run: npm install --save @vue/composition-api/dist/vue-composition-api.mjs  

Some rely on

{ "@nuxtjs/composition-api": "^0.29.3", "nuxt": "^2.15.8", "pinia": "^2.0.0", }

This is the configuration of the package package.json

{
  "version": "1.1.10",
  "keywords": [
    "vue",
    "utils"
  ],
  "license": "MIT",
  "exports": {
    ".": {
      "import": "./index.esm.js",
      "require": "./index.cjs.js"
    },
    "./*": "./*"
  },
  "main": "./index.cjs",
  "types": "./index.d.ts",
  "module": "./index.mjs",
  "unpkg": "./index.iife.min.js",
  "jsdelivr": "./index.iife.min.js",
  "sideEffects": false,
  "peerDependencies": {
    "pinia": ">=2.0.0",
    "@vue/composition-api": "^1.1.0",
    "vue": "^2.6.0 || ^3.2.0"
  },
  "peerDependenciesMeta": {
    "vue": {
      "optional": true
    },
    "@vue/composition-api": {
      "optional": true
    }
  },
  "devDependencies": {
    "pinia": "^2.0.0"
  },
  "dependencies": {
    "vue-demi": "*"
  }
}

I looked it up and it didn't seem to help me https://github.com/vueuse/vue-demi/issues/76 What should I do

antfu commented 2 years ago

@nuxtjs/composition-api is deprecated in favor of Nuxt Bridge. Please consider migrating.