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

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

Open
au-to opened this issue Sep 7, 2024 · 3 comments

Comments

@au-to
Copy link

au-to commented Sep 7, 2024

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
Copy link
Member

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

@au-to
Copy link
Author

au-to commented Sep 28, 2024

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
Copy link
Member

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.

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

2 participants