When I run 'webpack' in cmd, it gives me an error:
Cannot find module 'D:\nodejs\node_modules\webpack\bin\webpack.js
But I get correct result when I run it in Git Bash.
I have set the NODE_PATH
and install webpack global
CMD Image
Git Bash Image
To solve the "Cannot find module 'webpack'" error, make sure to install webpack globally by running the npm i -g webpack command and create a symbolic link from the globally-installed package to node_modules by running the npm link webpack command. Copied! Once you run the two commands, the error should be resolved.
To answer your specific question, the webpack configuration is stored wherever your global node_modules are installed; on Windows this is typically %AppData%\Roaming\npm\node_modules\powerbi-visuals-tools\lib\webpack. config. js.
Webpack provides a Node. js API which can be used directly in Node. js runtime.
Try this in your CMD
npm remove webpack -g
npm i webpack --save-dev
npm run webpack
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