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

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

Compiling vite Failed with vuepress 2.0.0-beta.51 by Yarn #40

Closed ykla closed 1 year ago

ykla commented 1 year ago
ykla@ykla-virtual-machine:~/FreeBSD-Ask-Next-main$ cat package.json 
{
  "author": "FreeBSD Chinese Community",
  "license": "BSD-3-Clause",
  "main": "index.js",
  "name": "freebsd-ask-next",
  "version": "1.0.0",
  "devDependencies": {
    "@vuepress/plugin-google-analytics": "2.0.0-beta.51",
    "vuepress": "2.0.0-beta.51",
    "vuepress-plugin-sitemap2": "2.0.0-beta.108",
    "vuepress-plugin-seo2": "2.0.0-beta.108",
    "vuepress-plugin-full-text-search2": "^0.4.0"
  },
  "scripts": {
    "docs:build": "vuepress build docs",
    "docs:dev": "vuepress dev docs"
  }
}
ykla@ykla-virtual-machine:~/FreeBSD-Ask-Next-main$ yarn install
yarn install v1.22.19
info No lockfile found.
[1/4] Resolving packages...
warning vuepress-plugin-full-text-search2 > @vuepress/core@2.0.0-beta.50-pre.1: deprecated
warning vuepress-plugin-full-text-search2 > @vuepress/core > @vuepress/client@2.0.0-beta.50-pre.1: deprecated
warning vuepress-plugin-full-text-search2 > @vuepress/core > @vuepress/markdown@2.0.0-beta.50-pre.1: deprecated
warning vuepress-plugin-full-text-search2 > @vuepress/core > @vuepress/shared@2.0.0-beta.50-pre.1: deprecated
warning vuepress-plugin-full-text-search2 > @vuepress/core > @vuepress/utils@2.0.0-beta.50-pre.1: deprecated
warning vuepress-plugin-full-text-search2 > @vuepress/core > @vuepress/client > @vuepress/shared@2.0.0-beta.50-pre.1: deprecated
warning vuepress-plugin-full-text-search2 > @vuepress/core > @vuepress/markdown > @vuepress/shared@2.0.0-beta.50-pre.1: deprecated
warning vuepress-plugin-full-text-search2 > @vuepress/core > @vuepress/markdown > @vuepress/utils@2.0.0-beta.50-pre.1: deprecated
warning vuepress-plugin-full-text-search2 > @vuepress/core > @vuepress/utils > @vuepress/shared@2.0.0-beta.50-pre.1: deprecated
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "vuepress > vuepress-vite@2.0.0-beta.51" has unmet peer dependency "@vuepress/client@^2.0.0-beta.50".
warning "vuepress > vuepress-vite@2.0.0-beta.51" has unmet peer dependency "vue@^3.2.37".
[4/4] Building fresh packages...
success Saved lockfile.
Done in 30.97s.
ykla@ykla-virtual-machine:~/FreeBSD-Ask-Next-main$ yarn docs:build
yarn run v1.22.19
$ vuepress build docs
✔ Initializing and preparing data - done in 1.53s
⠼ Compiling with vite[vite:load-fallback] Could not load /home/ykla/FreeBSD-Ask-Next-main/docs/.vuepress/.temp/internal/layoutComponents (imported by node_modules/vuepress-plugin-full-text-search2/node_modules/@vuepress/client/dist/chunk-RTLFYRTT.js): ENOENT: no such file or directory, open '/home/ykla/FreeBSD-Ask-Next-main/docs/.vuepress/.temp/internal/layoutComponents'
✖ Compiling with vite - failed in 16.10s
Error: Could not load /home/ykla/FreeBSD-Ask-Next-main/docs/.vuepress/.temp/internal/layoutComponents (imported by node_modules/vuepress-plugin-full-text-search2/node_modules/@vuepress/client/dist/chunk-RTLFYRTT.js): ENOENT: no such file or directory, open '/home/ykla/FreeBSD-Ask-Next-main/docs/.vuepress/.temp/internal/layoutComponents'
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I also tried to remove ^ in "^0.4.0".

ykla@ykla-virtual-machine:~/FreeBSD-Ask-Next-main$ yarn install
yarn install v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "vuepress > vuepress-vite@2.0.0-beta.51" has unmet peer dependency "@vuepress/client@^2.0.0-beta.50".
warning "vuepress > vuepress-vite@2.0.0-beta.51" has unmet peer dependency "vue@^3.2.37".
[4/4] Building fresh packages...
success Saved lockfile.
Done in 4.92s.
ykla@ykla-virtual-machine:~/FreeBSD-Ask-Next-main$ yarn docs:build
yarn run v1.22.19
$ vuepress build docs
✔ Initializing and preparing data - done in 1.61s
⠇ Compiling with vite[vite:load-fallback] Could not load /home/ykla/FreeBSD-Ask-Next-main/docs/.vuepress/.temp/internal/layoutComponents (imported by node_modules/vuepress-plugin-full-text-search2/node_modules/@vuepress/client/dist/chunk-RTLFYRTT.js): ENOENT: no such file or directory, open '/home/ykla/FreeBSD-Ask-Next-main/docs/.vuepress/.temp/internal/layoutComponents'
✖ Compiling with vite - failed in 12.40s
Error: Could not load /home/ykla/FreeBSD-Ask-Next-main/docs/.vuepress/.temp/internal/layoutComponents (imported by node_modules/vuepress-plugin-full-text-search2/node_modules/@vuepress/client/dist/chunk-RTLFYRTT.js): ENOENT: no such file or directory, open '/home/ykla/FreeBSD-Ask-Next-main/docs/.vuepress/.temp/internal/layoutComponents'
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ykla@ykla-virtual-machine:~/FreeBSD-Ask-Next-main$ yarn  --version
1.22.19
ykla@ykla-virtual-machine:~/FreeBSD-Ask-Next-main$ node -v
v16.17.0
ykla@ykla-virtual-machine:~/FreeBSD-Ask-Next-main$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.1 LTS
Release:    22.04
Codename:   jammy
ota-meshi commented 1 year ago

I think you should first remove the lockfile and node_modules and reinstall. If that doesn't work please share the repository.

ykla commented 1 year ago

I think you should first remove the lockfile and node_modules and reinstall. If that doesn't work please share the repository.

I have no lockfile or node_modules. GitHub action please see https://github.com/FreeBSD-Ask/FreeBSD-Ask-Next/tree/a4f43ab6b82879f45e477309f346d5d92d6c9d36

ota-meshi commented 1 year ago

I can't reproduce your problem using your repo. Please provide a reproducible repository.

ota-meshi commented 1 year ago
image
ykla commented 1 year ago

I've tested it a few more times and still have the same problem. Both the github action and my local action have the same result.

please see https://github.com/FreeBSD-Ask/FreeBSD-Ask-Next/actions from #539: Commit 25bd5f0 to #544: Commit ae0ca85.

It was all built from scratch with no cache and no other projects.

ota-meshi commented 1 year ago

I can't help anything unless you provide a reproducible repository.

ykla commented 1 year ago

Ok I find the problem. Are you test by NPM not Yarn?Yor project can be compiled by NPM but will not compiled by Yarn. I test successfully with NPM. Please see https://github.com/FreeBSD-Ask/FreeBSD-Ask-Next/actions/runs/3225561732 with commit ca97d9f45ab20cec06cc54bc3998f51595647834 and commit 686ba2ab039866dffb716ada949774938535a44e.