Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: Cannot find module 'webpack'

People also ask

How do you fix Webpack CLI error Cannot find module Webpack Lib rules DescriptionDataMatcherRulePlugin?

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.

Can not find module Webpack Lib rules DescriptionDataMatcherRulePlugin?

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.

Where is my Webpack config JS?

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

rmis 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