Error: cannot find module ‘webpack / lib / ruleset’_ solve

1. Error report

Error: Cannot find module 'webpack/lib/RuleSet'

In the first question, I tried to put node_ Modules folder and package- lock.json Delete the file and then NPM install it. I don’t know if it’s useful or not. Let’s take a note to solve the problem
Comments below

2. After the execution, an error is reported

Error: Rule can only have one resource source (provided resource and test +

1 40643648/article/details/109444867
reload webpage

3. Error report after execution

These dependencies were not found:
@videojs/vhs-utils/dist/byte-helpers in ./node_modules/video.js/dist/
@videojs/vhs-utils/dist/containers in ./node_modules/video.js/dist/

Baidu found that the error was lack of dependence, so it directly solved the problem

npm install 
yarn run server

Read More: