ota-meshi / vuepress-plugin-full-text-search2

VuePress v2 plugin that adds full-text search box.
MIT License
34 stars 4 forks source link

Please remove vuepress sources from the released package. #38

Closed JerryZhongJ closed 1 year ago

JerryZhongJ commented 1 year ago

I installed your plugin through yarn add vuepress-plugin-full-text-search2. And I got these error messages in my IDE. And I can't build my web site. (Build was successful, but the web page was completely blank).

Type 'PluginObject' is not assignable to type 'Plugin | Plugin[]'.

Type 'import(\"/home/jerry/Documents/blog/node_modules/vuepress-plugin-full-text-search2/node_modules/@vuepress/core/dist/index\").PluginObject' is not assignable to type 'import(\"/home/jerry/Documents/blog/node_modules/@vuepress/core/dist/index\").PluginObject'.

Types of property 'onInitialized' are incompatible.

Type '((app: import(\"/home/jerry/Documents/blog/node_modules/vuepress-plugin-full-text-search2/node_modules/@vuepress/core/dist/index\").App) => PromiseOrNot) | undefined' is not assignable to type '((app: import(\"/home/jerry/Documents/blog/node_modules/@vuepress/core/dist/index\").App) => PromiseOrNot) | undefined'.

Type '(app: import(\"/home/jerry/Documents/blog/node_modules/vuepress-plugin-full-text-search2/node_modules/@vuepress/core/dist/index\").App) => PromiseOrNot' is not assignable to type '(app: import(\"/home/jerry/Documents/blog/node_modules/@vuepress/core/dist/index\").App) => PromiseOrNot'.

Types of parameters 'app' and 'app' are incompatible.

Property 'layouts' is missing in type 'import(\"/home/jerry/Documents/blog/node_modules/@vuepress/core/dist/index\").App' but required in type 'import(\"/home/jerry/Documents/blog/node_modules/vuepress-plugin-full-text-search2/node_modules/@vuepress/core/dist/index\").App'.

Seems like you have included vuepress sources in your node_modules folder, and your plugin imports stuffs from that vuepress, which are not compatible with the vuepress in my node_modules. And everythings got right after I renamed your node_modules.

ota-meshi commented 1 year ago

I cannot reproduce your problem. Please provide a minimal repository to reproduce your problem.

JerryZhongJ commented 1 year ago

Check this out.

ota-meshi commented 1 year ago

You can at least fix the module issue by removing yarn.lock and node_modules and running yarn install again.

JerryZhongJ commented 1 year ago

I’m sorry but I didn’t get what you mean. Removing lock file and node_modules just simply reinstall vuepress and the plugin. How is this gonna fix the issue?

JerryZhongJ commented 1 year ago

I installed them again, still didn't work.

clearw5 commented 1 year ago

same issue.