vuepress-reco / vuepress-theme-reco

🎨 This is the repo for vuepress-theme-reco 2.
https://vuepress-theme-reco.recoluan.com
MIT License
591 stars 190 forks source link

When configuring valine comments, comments cannot be displayed and the browser console reports an error. #299

Open au-to opened 2 months ago

au-to commented 2 months ago

error:Valine.min.js?v=debad364:7 Uncaught (in promise) TypeError: Cannot set properties of undefined (setting 'Valine')

package.json:{ "name": "vuepress-theme-reco-demo", "version": "2.0.0", "description": "Demo for vuepress-theme-reco@2.x.", "repository": "git@github.com:recoluan/vuepress-theme-reco-demo.git", "author": "reco_luan recoluan@outlook.com", "license": "MIT", "scripts": { "dev": "vuepress dev .", "start": "vuepress dev .", "build": "vuepress build ." }, "dependencies": { "vue": "^3.4.27", "vuepress": "2.0.0-rc.13", "vuepress-theme-reco": "2.0.0-rc.16", "@vuepress/bundler-vite": "2.0.0-rc.13", "@vuepress/bundler-webpack": "2.0.0-rc.13" } }

config.ts: commentConfig: { type: 'valine', options: { appId: '', appKey: '', visitor: true }, },

npm-v:20.11.0

recoluan commented 1 month ago

Please upgrade to the latest version (vuepress@2.0.0-rc.14 & vuepress-theme-reco@2.0.0-rc.20).

au-to commented 1 month ago

I have updated my dependencies like follow,but the console still reporting error: TypeError: Cannot set properties of undefined (setting 'Valine') "dependencies": { "vue": "^3.4.27", "vuepress": "2.0.0-rc.14", "vuepress-theme-reco": "2.0.0-rc.20", "@vuepress/bundler-vite": "2.0.0-rc.14", "@vuepress/bundler-webpack": "2.0.0-rc.14" }

recoluan commented 1 month ago

I tested it and found that the local development environment was abnormal, but it will work normally after compilation, so you can publish it and try it.