SoftwareBrothers / better-docs

Beautiful toolbox for jsdoc generated documentation - with 'typescript', `category` and `component` plugins
MIT License
855 stars 127 forks source link

Vue packages version mismatch when trying to use @component plugin #248

Open Patrex97 opened 1 year ago

Patrex97 commented 1 year ago

I want to add jsdoc to my vue project after adding @component plugin from better-docs. I face error.

Error message:

Vue packages version mismatch:

- vue@3.3.4 (C:\Users\patre\OneDrive\Pulpit\Work\instore\app\node_modules\vue\index.js)
- vue-template-compiler@2.7.14 (C:\Users\patre\OneDrive\Pulpit\Work\instore\app\node_modules\vue-template-compiler\package.json)

This may cause things to work incorrectly. Make sure to use the same version for both.
If you are using vue-loader@>=10.0, simply update vue-template-compiler.
If you are using vue-loader@<10.0 or vueify, re-installing vue-loader/vueify should bump vue-template-compiler to the latest.

jsdoc.json

{
    "plugins": [
        "node_modules/better-docs/component"
    ],
    "source": {
        "includePattern": "\\.(vue|js)$",
        "include": [
            "./src/App.vue"
        ]
    },
    "sourceType": "module",
    "recurseDepth": 10,
    "opts": {
        "destination": "./docs/App.vue",
        "recurse": true
    },
    "tags": {
        "allowUnknownTags": true,
        "dictionaries": [
            "jsdoc",
            "closure"
        ]
    },
    "templates": {
        "cleverLinks": false,
        "monospaceLinks": false
    }
}

package.json

    "dependencies": {
        "@glidejs/glide": "^3.6.0",
        "@vitejs/plugin-legacy": "^4.0.4",
        "@vueuse/components": "^10.1.2",
        "@vueuse/core": "^10.1.2",
        "pinia": "^2.1.3",
        "vue": "^3.3.4",
        "vue-router": "^4.2.2"
    },
    "devDependencies": {
        "@vitejs/plugin-vue": "^4.2.3",
        "@vue/compiler-sfc": "^3.3.4",
        "better-docs": "^2.7.2",
        "jsdoc": "^4.0.2",
        "sass": "^1.62.1",
        "terser": "^5.17.7",
        "vite": "^4.3.9"
    }

I tried to install vue-loader and vue-template-compiler as dependencies but it didn't change anything.

Johansenlbw commented 1 year ago

I am also encountering the same problem.

hermesalvesbr commented 11 months ago

Same here, any solution?