Webpack ERROR in Path must be a string. Received undefined

Knowledge map advanced must read: read how large-scale map data efficient storage and retrieval>>>

In the process of learning webpack, I encountered the following problems and solutions

the questions are as follows:

The screenshot of node version is as follows:

Screenshot of package.json file:

Screenshot of webpack.config.js file:

Then, I run the project and report an error message: error in path must be a string

solution:

Modify the webpack.config.js file, save the modification, and then run to solve the problem

plugins: [

new HtmlWebpackPlugin({

title: 'use plugin',

filename: 'index.html'

})

]

PS: These are the solutions to the problems I encountered. If there are other methods, please give us your advice, thank you

Similar Posts: