Skip to content
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] Uncaught TypeError: Cannot read property 'defineClientAppSetup' of undefined #93

Closed
yuantongkang opened this issue Apr 1, 2021 · 5 comments

Comments

@yuantongkang
Copy link

yuantongkang commented Apr 1, 2021

Bug report

Description

Steps to reproduce

accroad to officeal Getting Started to init the project ,and then yarn docs:dev"

  • Reproduction link / repo:

Expected behavior

can work success

Screenshots

WX20210401-144821@2x.png

Environment info

  • Browser:
  • Output of vuepress info:
# Paste output of `vuepress info` here
system:
    OS: macOS 11.2.3
    CPU: (8) arm64 Apple M1
    Memory: 84.09 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 15.5.1 - ~/.nvm/versions/node/v15.5.1/bin/node
    Yarn: 1.22.10 - ~/.nvm/versions/node/v15.5.1/bin/yarn
    npm: 7.6.3 - /usr/local/bin/npm
  Utilities:
    Git: 2.30.2
  Browsers:
    Chrome: 89.0.4389.114
    Edge: Not Found
    Firefox: Not Found
    Safari: 14.0.3
  npmPackages:
    @vuepress/bundler-webpack:  2.0.0-beta.1 
    @vuepress/cli:  2.0.0-beta.0 (2.0.0-beta.1)
    @vuepress/client:  2.0.0-beta.0 (2.0.0-beta.1)
    @vuepress/core:  2.0.0-beta.0 (2.0.0-beta.1)
    @vuepress/markdown:  2.0.0-beta.0 (2.0.0-beta.1)
    @vuepress/plugin-active-header-links:  2.0.0-beta.0 (2.0.0-beta.1)
    @vuepress/plugin-back-to-top:  2.0.0-beta.0 (2.0.0-beta.1)
    @vuepress/plugin-container:  2.0.0-beta.0 (2.0.0-beta.1)
    @vuepress/plugin-debug: Not Found
    @vuepress/plugin-docsearch: Not Found
    @vuepress/plugin-git:  2.0.0-beta.0 (2.0.0-beta.1)
    @vuepress/plugin-google-analytics: Not Found
    @vuepress/plugin-medium-zoom:  2.0.0-beta.0 (2.0.0-beta.1)
    @vuepress/plugin-nprogress:  1.8.2 (2.0.0-beta.0, 2.0.0-beta.1)
    @vuepress/plugin-palette:  2.0.0-beta.0 (2.0.0-beta.1)
    @vuepress/plugin-pwa: Not Found
    @vuepress/plugin-pwa-popup: Not Found
    @vuepress/plugin-theme-data:  2.0.0-beta.0 (2.0.0-beta.1)
    @vuepress/shared:  2.0.0-beta.0 (2.0.0-beta.1)
    @vuepress/theme-default:  2.0.0-beta.0 (2.0.0-beta.1)
    @vuepress/theme-vue: Not Found
    @vuepress/utils:  2.0.0-beta.0 (2.0.0-beta.1)
    vue:  3.0.7 
    vue-loader:  16.1.2 
    vue-router:  4.0.5 
    vuepress: ^2.0.0-beta.1 => 2.0.0-beta.1 
@yuantongkang yuantongkang changed the title [Bug report] defineClientAppSetup [Bug report] Uncaught TypeError: Cannot read property 'defineClientAppSetup' of undefined Apr 1, 2021
@meteorlxy
Copy link
Member

Well, not sure if it's an issue with pnpm. Please provide a reproduce repository.

@yuantongkang
Copy link
Author

Well, not sure if it's an issue with pnpm. Please provide a reproduce repository.

https://github.com/yuantongkang/vuepress2-issue

@meteorlxy
Copy link
Member

If you only need vite, you can only use vuepress-vite, and upgrade it to the latest version:

https://github.com/vuepress/vuepress-next/blob/64de63cfacbc4d1d66430055f336eac970a5214c/packages/vuepress-vite/package.json#L2-L3

@AGPDev
Copy link

AGPDev commented Apr 16, 2021

I have issues with pnpm too, i need install using yarn and start with yarn or pnpm to works.

image

@meteorlxy
Copy link
Member

Try adding shamefully-hoist=true in the .npmrc file of your project, and re-install deps with pnpm.

See https://pnpm.io/npmrc#shamefully-hoist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants