1
votes

I have a asp.net core react app and using webpack for bundling .I have installed required dependencies but when build application it shows an error.

How could i resolve this error.

I have installed required dependencies so many times done npm cache clean and restarted a machine.still its showing not installed in vs solution explorer.

enter image description here

webpack installed in requied folder.

IN vs solution

enter image description here

enter image description here when try to restore package inside solution explorer,its not installed.

enter image description here

webpack-cli is missing

1

1 Answers

1
votes

You doing wrong in your npm install

Should be this command for global

npm i -g webpack-cli

or this command for local

npm i -D webpack-cli

You can not mix up between -D -g flag

If that didn't work for you try to right click on that package and click restore

Update:

Try to delete package-lock.json then run npm i -D webpack-cli again