【发布时间】:2017-10-11 01:38:32
【问题描述】:
我正在尝试使用 webpack 启动我的本地开发环境 并且遇到了这个脚本部分的问题
"scripts": {
"start": "npm run build",
"build": "webpack -d && copy /src/index.html /dist/index.html && webpack-dev-server --content-base src/ --inline",
"build:prod": "webpack -p && copy /src/index.html dist/index.html"
},
当我在执行 npm start 时,我看到 2 个这样的错误
还有一个 npm run build failed 这些错误的原因是什么?
index.html 存在于提供的地址
我虽然 mb 我错过了我的依赖项,但一切似乎都到位
"dependencies": {
"body-parser": "^1.18.2",
"express": "^4.16.1",
"oracledb": "^1.13.1",
"react": "^16.0.0",
"react-dom": "^16.0.0",
"socket.io": "^2.0.3"
},
"devDependencies": {
"babel-core": "^6.26.0",
"babel-loader": "^7.1.2",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-2": "^6.24.1",
"webpack": "^3.6.0",
"webpack-dev-server": "^2.9.1"
}
【问题讨论】: