Cannot build Vue app when adding webpack extension Code Answer

Hello Developer, Hope you guys are doing great. Today at Tutorial Guruji Official website, we are sharing the answer of Cannot build Vue app when adding webpack extension without wasting too much if your time.

The question is published on by Tutorial Guruji team.

I’m trying to add this webpack extension and build my Vue app. From what I’ve read Vue/cli has webpack, and I’ve tried installing different versions of webpack too. For some reason I can’t get Vue app to build. Anyone got a fix or can point out where I’ve gone wrong?

I’ve already tried removing/reinstalled node_modules and package-lock.json and all that.

Error when using npm run build

Error when using npm run build

Plugin add code

Plugin add code

package.json

package.json

Answer

webpack-assets-manifest 5.x is only compatible with Webpack 5, but you’re using Vue CLI 4, which uses Webpack 4.

Either upgrade Vue CLI to 5.x:

npm i -D @vue/cli@5

or downgrade the plugin to 4.x:

npm i -D webpack-assets-manifest@4
We are here to answer your question about Cannot build Vue app when adding webpack extension - If you find the proper solution, please don't forgot to share this with your team members.

Related Posts

Tutorial Guruji