我正在将我的node.js更新到版本7。在项目中运行了webpack之后,我收到了错误消息:ERROR in Path must be a string. Received undefined
我的package.json:
"dependencies": {
"react": "^15.3.1",
"react-native": "^0.33.0",
"react-redux": "^4.4.5",
"react-web": "0.4.5",
"redux": "^3.6.0",
"redux-thunk": "^2.1.0",
"remote-redux-devtools": "^0.4.8"
},
"devDependencies": {
"babel-core": "^6.18.2",
"babel-loader": "^6.2.7",
"babel-preset-react-native": "^1.9.0",
"babel-preset-stage-1": "^6.16.0",
"haste-resolver-webpack-plugin": "^0.2.2",
"json-loader": "^0.5.4",
"react-dom": "^15.3.2",
"react-hot-loader": "^1.3.0",
"webpack": "^1.13.3",
"webpack-dev-server": "^1.16.2",
"webpack-html-plugin": "^0.1.1"
}有谁有建议吗?如何解决这个问题?
发布于 2018-06-06 01:11:19
当我在学习Writing your AngularJS with Redux时
我得到“路径”参数必须是字符串类型的错误。收到类型未定义的webpack:编译失败。

“
最后,我按照CrzMarvin的解决方案,在webpack.config.js中添加了文件名(文件名:'index.html',),解决了这个问题。

ThX CrzMarvin
发布于 2017-11-16 15:34:44
我之前也遇到过同样的问题,然后我想是插件出了问题。然后,我添加文件名到这个plugin.It工作。
// webpack.config.js
plugins: [
new HtmlWebpackPlugin({
title: 'use plugin',
filename: 'index.html'
})
]发布于 2019-12-23 10:35:49
您应该安装html-webpack-plugin依赖项,而不是webpack-html-plugin。我以前也有过同样的问题
https://stackoverflow.com/questions/40436830
复制相似问题