Closed Mister-Hope closed 4 years ago
smoothScroll: true
is only a feature of default theme, not @vuepress/core
.
If you are building your own theme, you need to introduce vuepress-plugin-smooth-scroll
yourself.
Why not have a more carefully look before closing it? I fell a little offend while you did that.
After all now it's not a vupress offical plugin, while under your repo.
tip Apply theme vuepress-theme-hope (extends @vuepress/theme-default) ...
My theme extends it, I have figure out the error ,see #1943
This error seems to be casused by wrong dependecy trees.
Besides I was just talking about who passed this error message ---@vuepress/code
You can see my package.json and package-lock.json at Here
{
"name": "blog",
"version": "1.0.0",
"description": "个人博客",
"scripts": {
"serve": "vuepress dev src",
"cleanServe": "vuepress dev src --no-cache",
"build": "vuepress build src",
"test": "echo \"Warning: no test specified\" && exit 0"
},
"author": "Mr.Hope",
"license": "MIT",
"keywords": [
"vuepress",
"personal-blog"
],
"dependencies": {
"vuepress": "^1.2.0"
},
"devDependencies": {
"@vuepress/plugin-blog": "^1.4.0",
"eslint": "^6.5.1",
"eslint-plugin-vue": "^5.2.3",
"vuepress-plugin-named-chunks": "^1.0.2",
"vuepress-theme-hope": "0.0.10-alpha1"
}
}
Npm put the smooth-scroll plugin under @vuepress/default-theme, and I can't figure out why.
I personally don't suggest to use theme extending.
For now you can add smooth-scroll plugin to your theme's / blog's dependencies to solve the problem
I fixed it by install vuepress first(only) and then other packages one by one and there is no more wrong dependency trees :cry:
I took some times searching reason on the internet, but I didn't find out why.
Isn't npm supposed to generate the same tree when same dependency installed? QAQ
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Environment
My theme package:
My docs:
Win10 1903 Node 10.16.3
What's your question?
After update to version 1.2.0, I removed
smooth-scroll
from my own theme, and addsmoothScroll: true
in my themeConfig, and I saw an error.while the smoth scroll featrue doesn't work.
This error will disappear after I rolled back to V1.1.0, and enable it by my own.
I am curious about it. I think the reason is that I have build or wrote something conflict with it.
Now I am very confused, because this error seems to be trigged at @vuepress/core and I am not familar with it. And I also don't have any infomation about with file or which line caused this error.
In a word, I don't know where to start debuging my code..... :cry:
If anyone can provide me some helps or opinions how can I debug this error, I will be very grateful.