To Solve Error: Cannot find module 'webpack/lib/rules/DescriptionDataMatcherRulePlugin' This error may occur Because of Vue-Loader. If you do not have an installed vue-loader then just install it in your project by running this command: npm i vue-loader Now, you can Run npm run dev And Your error must be solved.
To Solve [webpack-cli] Error: Cannot find module 'webpack/lib/rules/DescriptionDataMatcherRulePlugin' error There are two possible reasons for this error the First one is You are Using an Older version of the vue-loader and the Second One is You don't have a vue-loader installed.
The webpack configuration file webpack. config. js is the file that contains all the configuration, plugins, loaders, etc. to build the JavaScript part of the NativeScript application. The file is located at the root of the NativeScript application.
Link globally installed package to your project:
npm link webpack
Checkout the official documentation of yarn link
.
While working on windows, I've installed webpack locally and it fixed my problem
So, on your command prompt, go to the directory of which you want to run webpack, install webpack locally (without the -g) and enjoy...
I solved the same problem by reinstalling, execute these commands
rm -Rf node_modules
rm -f package-lock.json
npm install
rm
is always a dangerous command, especially with -f
, please notice that before executing it!!!!!
Run below commands in Terminal:
npm install --save-dev webpack
npm install --save-dev webpack-dev-server
Seems to be a common Windows problem. This fixed it for me:
Nodejs cannot find installed module on Windows?
"Add an environment variable called NODE_PATH
and set it to %USERPROFILE%\Application Data\npm\node_modules
(Windows XP), %AppData%\npm\node_modules
(Windows 7), or wherever npm ends up installing the modules on your Windows flavor. To be done with it once and for all, add this as a System variable in the Advanced tab of the System Properties dialog (run control.exe sysdm.cpl,System,3)."
Note that you can't actually use another environment variable within the value of NODE_PATH
. That is, don't just copy and paste that string above, but set it to an actual resolved path like C:\Users\MYNAME\AppData\Roaming\npm\node_modules
I was having this issue on OS X and it seemed to be caused by a version mismatch between my globally installed webpack
and my locally installed webpack-dev-server
. Updating both to the latest version got rid of the issue.
Installing both webpack and CLI globally worked for me.
npm i -g webpack webpack-cli
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With