以下是webpack.config.js文件为我作出反应的应用程序的WebPack编译错误
module.exports = {
entry: 'index.js',
output: {
filename: 'bundle.js',
path: '/.'
},
module: {
loaders: [
{
test: /\.jsx?$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel-loader',
query: {
presets: ['react']
}
}
]
}
};
,我在执行得到错误如下:
npm ERR! code ELIFECYCLE
npm ERR! errno 4294967295
npm ERR! [email protected] start: `webpack-dev-server --hot`
npm ERR! Exit status 4294967295
npm ERR!
npm ERR! Failed at the [email protected] start script 'webpack-dev-server --hot'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the loginpoc package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! webpack-dev-server --hot
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs loginpoc
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls loginpoc
npm ERR! There is likely additional logging output above
我的package.json是如下
{
"name": "loginpoc",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "webpack-dev-server --hot"
},
"author": "",
"license": "ISC",
"dependencies": {
"react": "^15.5.3",
"react-dom": "^15.5.3",
"webpack": "^2.3.3",
"webpack-dev-server": "^2.4.2"
}
}
请让我知道你在哪里建议我哪里错了?
能否请您告诉我们LoginPOC代码和进口的lib?您也可以向我们提供您的WebPack版本 –
您的输入'.index.js'。它不应该是'index.js'。这是一个错字或故意? – Panther
的WebPack版本2.3.3 –