vuepress / core

Vue-Powered Static Site Generator
https://vuepress.vuejs.org
MIT License
2.31k stars 922 forks source link

[Bug report] Build fails with Webpack 5.48.0 #336

Closed ghost closed 3 years ago

ghost commented 3 years ago

Bug report

Description

Build fails with Webpack 5.48.0, with the following error:

Error: Cannot find module 'webpack/lib/rules/DescriptionDataMatcherRulePlugin'

Workaround

Pin webpack to version 5.47.1 in your package.json.

Steps to reproduce

  1. Setup a basic vuepress project.
  2. Run vuepress dev command.

Expected behavior

Should work.

Screenshots

none

Environment info

System:
    OS: Linux 5.4 Ubuntu 20.04.2 LTS (Focal Fossa)
    CPU: (8) x64 Intel(R) Core(TM) i5-8300H CPU @ 2.30GHz
    Memory: 7.74 GB / 15.48 GB
    Shell: 5.0.17 - /bin/bash
  Binaries:
    Node: 16.6.0 - /usr/bin/node
    Yarn: Not Found
    npm: 7.20.2 - /usr/local/bin/npm
  Utilities:
    Git: 2.25.1 - /usr/bin/git
  Browsers:
    Chrome: Not Found
    Firefox: 90.0
  npmPackages:
    @vuepress/bundler-vite: Not Found
    @vuepress/bundler-webpack:  2.0.0-beta.23 
    @vuepress/cli:  2.0.0-beta.23 
    @vuepress/client:  2.0.0-beta.23 
    @vuepress/core:  2.0.0-beta.23 
    @vuepress/markdown:  2.0.0-beta.23 
    @vuepress/plugin-active-header-links:  2.0.0-beta.23 
    @vuepress/plugin-back-to-top:  2.0.0-beta.23 
    @vuepress/plugin-container:  2.0.0-beta.23 
    @vuepress/plugin-debug: Not Found
    @vuepress/plugin-docsearch: Not Found
    @vuepress/plugin-git:  2.0.0-beta.23 
    @vuepress/plugin-google-analytics: Not Found
    @vuepress/plugin-medium-zoom:  2.0.0-beta.23 
    @vuepress/plugin-nprogress:  2.0.0-beta.23 
    @vuepress/plugin-palette:  2.0.0-beta.23 
    @vuepress/plugin-prismjs:  2.0.0-beta.23 
    @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.23 
    @vuepress/plugin-toc: Not Found
    @vuepress/shared:  2.0.0-beta.23 
    @vuepress/theme-default:  2.0.0-beta.23 
    @vuepress/utils:  2.0.0-beta.23 
    vue:  3.1.5 
    vue-loader:  16.4.0 
    vue-router:  4.0.10 
    vuepress: ^2.0.0-beta.23 => 2.0.0-beta.23 
    vuepress-vite: Not Found
meteorlxy commented 3 years ago

https://github.com/vuejs/vue-loader/issues/1859

meteorlxy commented 3 years ago

Bumping vue-loader to 16.4.1 could fix that problem.

selah202133 commented 3 years ago

[webpack-cli] Error: Cannot find module 'webpack/lib/rules/DescriptionDataMatcherRulePlugin' Require stack:

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\yamileon\AppData\Roaming\npm-cache_logs\2021-08-19T13_21_56_198Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 2 npm ERR! @ dev: npm run development npm ERR! Exit status 2 npm ERR! npm ERR! Failed at the @ dev script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\yamileon\AppData\Roaming\npm-cache_logs\2021-08-19T13_21_56_375Z-debug.log Buenas tengo este error