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] Can't upgrade to beta 58 from 54 #1196

Closed
zwik opened this issue Dec 12, 2022 · 7 comments
Closed

[Bug report] Can't upgrade to beta 58 from 54 #1196

zwik opened this issue Dec 12, 2022 · 7 comments
Labels
question Asking question

Comments

@zwik
Copy link

zwik commented Dec 12, 2022

Description

When upgrading I can't use a dev nor production build and get error during development like this:

[plugin:vite:import-analysis] Failed to resolve import "/home/marcel/documents/code/environment/mirror-2021/node_modules/@vuepress/theme-default/lib/client/layouts/404.vue" from "docs/.vuepress/.temp/internal/layoutComponents.js". Does the file exist?

I removed the caret and installed again but same issues.

Reproduction

https://github.com/zwik/mirror-2021

Used Package Manager

npm

System Info

npm run info                                                                                                                                                                                    127 ✘  09:31:47  

> [email protected] info
> vuepress info


  System:
    OS: Linux 5.15 Ubuntu 22.10 22.10 (Kinetic Kudu)
    CPU: (12) x64 AMD Ryzen 5 3600 6-Core Processor
    Memory: 12.66 GB / 15.58 GB
    Shell: 5.9 - /usr/bin/zsh
  Binaries:
    Node: 18.12.1 - ~/.nvm/versions/node/v18.12.1/bin/node
    Yarn: 1.22.5 - /mnt/c/Program Files (x86)/Yarn/bin/yarn
    npm: 8.19.2 - ~/.nvm/versions/node/v18.12.1/bin/npm
  Utilities:
    Git: 2.37.2 - /usr/bin/git
  Browsers:
    Chrome: Not Found
    Firefox: Not Found
  npmPackages:
    @vuepress/bundler-vite:  2.0.0-beta.58 
    @vuepress/bundler-webpack: Not Found
    @vuepress/cli:  2.0.0-beta.58 
    @vuepress/client:  2.0.0-beta.50-pre.1 (2.0.0-beta.58)
    @vuepress/core:  2.0.0-beta.58 
    @vuepress/markdown:  2.0.0-beta.58 
    @vuepress/plugin-active-header-links:  2.0.0-beta.58 
    @vuepress/plugin-back-to-top:  2.0.0-beta.58 
    @vuepress/plugin-container:  2.0.0-beta.58 
    @vuepress/plugin-docsearch: Not Found
    @vuepress/plugin-external-link-icon:  2.0.0-beta.58 
    @vuepress/plugin-git:  2.0.0-beta.58 
    @vuepress/plugin-google-analytics: Not Found
    @vuepress/plugin-medium-zoom:  2.0.0-beta.58 
    @vuepress/plugin-nprogress:  2.0.0-beta.58 
    @vuepress/plugin-palette:  2.0.0-beta.58 
    @vuepress/plugin-prismjs:  2.0.0-beta.58 
    @vuepress/plugin-pwa: Not Found
    @vuepress/plugin-pwa-popup: Not Found
    @vuepress/plugin-register-components: Not Found
    @vuepress/plugin-search: Not Found
    @vuepress/plugin-shiki: Not Found
    @vuepress/plugin-theme-data:  2.0.0-beta.58 
    @vuepress/plugin-toc: Not Found
    @vuepress/shared:  2.0.0-beta.50-pre.1 (2.0.0-beta.58)
    @vuepress/theme-default:  2.0.0-beta.58 
    @vuepress/utils:  2.0.0-beta.58 
    vue:  3.2.45 
    vue-loader: Not Found
    vue-router:  4.1.6 
    vuepress: 2.0.0-beta.58 => 2.0.0-beta.58 
    vuepress-vite:  2.0.0-beta.58 
    vuepress-webpack: Not Found
@init-qy
Copy link

init-qy commented Dec 12, 2022

see #1195, don't use ^

@zwik
Copy link
Author

zwik commented Dec 12, 2022

As mentioned in the description. I've tried that, but that doesn't seem to work for me. I've updated the repo with that as well. You can also see in the output of vuepress info that the caret is not there.

@init-qy
Copy link

init-qy commented Dec 12, 2022

As mentioned in the description. I've tried that, but that doesn't seem to work for me. I've updated the repo with that as well. You can also see in the output of vuepress info that the caret is not there.

remove the package-lock.json, and try again?

in the vuepress info, @vuepress/client: 2.0.0-beta.50-pre.1 (2.0.0-beta.58) looks incorrent

this is my vuepress info

  System:
    OS: Windows 10 10.0.19044
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 5.00 GB / 15.91 GB
  Binaries:
    Node: 16.13.1 - C:\Program Files\nodejs\node.EXE
    Yarn: Not Found
    npm: 8.1.2 - C:\Program Files\nodejs\npm.CMD
  Utilities:
    Git: 2.29.2.
  Browsers:
    Chrome: 108.0.5359.99
    Edge: Spartan (44.19041.1266.0), Chromium (108.0.1462.46)
  npmPackages:
    @vuepress/bundler-vite:  2.0.0-beta.58
    @vuepress/bundler-webpack: Not Found
    @vuepress/cli:  2.0.0-beta.58
    @vuepress/client: 2.0.0-beta.58 => 2.0.0-beta.58
    @vuepress/core:  2.0.0-beta.58
    @vuepress/markdown:  2.0.0-beta.58
    @vuepress/plugin-active-header-links:  2.0.0-beta.58
    @vuepress/plugin-back-to-top:  2.0.0-beta.58
    @vuepress/plugin-container:  2.0.0-beta.58
    @vuepress/plugin-docsearch: Not Found
    @vuepress/plugin-external-link-icon:  2.0.0-beta.58
    @vuepress/plugin-git:  2.0.0-beta.58
    @vuepress/plugin-google-analytics: Not Found
    @vuepress/plugin-medium-zoom:  2.0.0-beta.58
    @vuepress/plugin-nprogress:  2.0.0-beta.58
    @vuepress/plugin-palette:  2.0.0-beta.58
    @vuepress/plugin-prismjs:  2.0.0-beta.58
    @vuepress/plugin-pwa: Not Found
    @vuepress/plugin-pwa-popup: Not Found
    @vuepress/plugin-register-components: Not Found
    @vuepress/plugin-search: Not Found
    @vuepress/plugin-shiki: Not Found
    @vuepress/plugin-theme-data:  2.0.0-beta.58
    @vuepress/plugin-toc: Not Found
    @vuepress/shared:  2.0.0-beta.58
    @vuepress/theme-default:  2.0.0-beta.58
    @vuepress/utils:  2.0.0-beta.58
    vue: 3.2.45 => 3.2.45
    vue-loader: Not Found
    vue-router: 4.1.6 => 4.1.6
    vuepress: 2.0.0-beta.58 => 2.0.0-beta.58
    vuepress-vite:  2.0.0-beta.58
    vuepress-webpack: Not Found

@zwik
Copy link
Author

zwik commented Dec 12, 2022

I've just removed the package-lock.json (and removed node_modules) and did npm install again, but it generates the exact same lock file. It will also result in the same error.

@zwik
Copy link
Author

zwik commented Dec 12, 2022

I've installed @vuepress/client@next as well now and that seems to resolve the issue.

When I look at the documentation I see that pnpm docs do require to install that dependency but yarn and npm docs do not mention that. Is the documentation correct?

@init-qy
Copy link

init-qy commented Dec 12, 2022

I find the peerDependencies in vuepress-vite, maybe this cause the incorrent version of @vuepress/client
In my view, pnpm is different when deal with peer, so it needs to install @vuepress/client@next
https://github.com/vuepress/vuepress-next/blob/619fc129246183658afc673febb7002f41970276/ecosystem/vuepress-vite/package.json#L47-L50

@Mister-Hope
Copy link
Member

I've installed @vuepress/client@next as well now and that seems to resolve the issue.

When I look at the documentation I see that pnpm docs do require to install that dependency but yarn and npm docs do not mention that. Is the documentation correct?

Yes, when using npm, any package can import other packages in the project, while pnpm only allow packages to import packages which declared in their package.json. @vuepress/client and vue are used during your usage, so they are required.

@vuepress vuepress locked and limited conversation to collaborators Dec 12, 2022
@Mister-Hope Mister-Hope converted this issue into discussion #1197 Dec 12, 2022
@Mister-Hope Mister-Hope added the question Asking question label Feb 21, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
question Asking question
Projects
None yet
Development

No branches or pull requests

3 participants