Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

[Bug report] Cant build project #1570

Closed
Daiyangcheng opened this issue May 28, 2024 · 9 comments
Closed

[Bug report] Cant build project #1570

Daiyangcheng opened this issue May 28, 2024 · 9 comments

Comments

@Daiyangcheng
Copy link

Description

When I run npm run docs:build, appear below error info:

root@ser423788766121:~/code/vuepress-starter# npm run docs:build

> [email protected] docs:build
> vuepress build docs

✔ Initializing and preparing data - done in 106ms
⠹ Compiling with vite
(!) Some chunks are larger than 500 kB after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
✔ Compiling with vite - done in 19.23s
✖ Rendering 10 pages - failed in 75ms
Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@internal/routes' imported from /root/code/vuepress-starter/node_modules/@vuepress/client/dist/chunk-ZQJPP2LC.js
    at packageResolve (node:internal/modules/esm/resolve:853:9)
    at moduleResolve (node:internal/modules/esm/resolve:910:20)
    at defaultResolve (node:internal/modules/esm/resolve:1130:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:396:12)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:365:25)
    at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:240:38)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:85:39)
    at link (node:internal/modules/esm/module_job:84:36)

Reproduction

http://58.49.146.73:64521/

Used Package Manager

npm

System Info

System:
    OS: Linux 6.1 Debian GNU/Linux 12 (bookworm) 12 (bookworm)
    CPU: (8) x64 Intel(R) Xeon(R) CPU E5-2666 v3 @ 2.90GHz
    Memory: 6.68 GB / 7.75 GB
    Shell: 5.2.15 - /bin/bash
  Binaries:
    Node: 20.11.1 - /usr/bin/node
    Yarn: Not Found
    npm: 10.8.0 - /usr/bin/npm
    pnpm: Not Found
    bun: Not Found
  Utilities:
    Git: 2.39.2 - /usr/bin/git
  Browsers:
    Chrome: Not Found
  npmPackages:
    @vuepress/bundler-vite: ^2.0.0-rc.12 => 2.0.0-rc.12 (2.0.0-rc.11)
    @vuepress/bundler-webpack:  2.0.0-rc.12 (2.0.0-rc.11)
    @vuepress/cli:  2.0.0-rc.12 
    @vuepress/client:  2.0.0-rc.12 (2.0.0-rc.9, 2.0.0-rc.11)
    @vuepress/core:  2.0.0-rc.12 (2.0.0-rc.9, 2.0.0-rc.11)
    @vuepress/markdown:  2.0.0-rc.12 (2.0.0-rc.9, 2.0.0-rc.11)
    @vuepress/shared:  2.0.0-rc.12 (2.0.0-rc.9, 2.0.0-rc.11)
    @vuepress/utils:  2.0.0-rc.12 (2.0.0-rc.9, 2.0.0-rc.11)
    vue:  3.4.27 
    vue-router:  4.3.2 
    vuepress: ^2.0.0-rc.12 => 2.0.0-rc.12
@Mister-Hope
Copy link
Member

很明显有多个版本的vuepress

@Mister-Hope
Copy link
Member

Mister-Hope commented May 28, 2024

@meteorlxy 我们也许需要更新vuepress info

原则上我们现在只需要关注vue,vuepress、bundler 和 @vuepress/helper 的版本,并且如果发现多个版本应该特别列出。

Copy link

Hello @Daiyangcheng. Please provide a minimal reproduction using a GitHub repository or v2.vuepress.vuejs.org/new. Issues marked with need reproduction will be closed if they have no activity within 7 days.

@meteorlxy
Copy link
Member

@Mister-Hope 我看 ecosystem 下现在在用 workspace:~ ,建议 rc 阶段还是用 workspace:* 锁版本号

@Daiyangcheng
Copy link
Author

{
  "name": "docs",
  "version": "1.0.0",
  "description": "LoCyan Doc",
  "scripts": {
    "docs:dev": "vuepress dev docs",
    "docs:build": "vuepress build docs",
    "docs:info": "vuepress info"
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "@vuepress/bundler-vite": "^2.0.0-rc.12",
    "@vuepress/plugin-docsearch": "^2.0.0-rc.30",
    "@vuepress/theme-default": "^2.0.0-rc.32",
    "vuepress": "^2.0.0-rc.12"
  },
  "dependencies": {
    "vuepress-plugin-remove-html-extension": "^1.9.0",
    "vuepress-theme-reco": "^2.0.0-rc.12",
    "vuepress-theme-sidebar": "^0.1.0"
  }
}

这是我的 package.json, 还需要其他部分吗

@mrholek
Copy link

mrholek commented May 30, 2024

@Daiyangcheng please try to remove plugins from config.js/ts. In my case, @vuepress/plugin-back-to-top cause the same error

@Mister-Hope
Copy link
Member

Mister-Hope commented May 30, 2024

vuepress-plugin-remove-html-extension

this definitely a v1 plugin

@Daiyangcheng
Copy link
Author

Daiyangcheng commented May 30, 2024

vuepress-plugin-remove-html-extension

this definitely a v1 plugin

This didn't work when i delete it from config.js

@meteorlxy
Copy link
Member

Please try to provide a production repository. Or, you can get started with v2 guide: https://vuepress.vuejs.org/guide/getting-started.html#project-setup

@vuepress vuepress locked and limited conversation to collaborators May 30, 2024
@meteorlxy meteorlxy converted this issue into discussion #1572 May 30, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

4 participants