Maragatha Mani

Maragatha Mani

  • 555
  • 4k
  • 473k

ReactJS - Environment Setup - (webpack)-dev-serve

Jan 3 2020 5:11 AM
i'm working On reactJs
 
INSTALL WEBPACK THEN I M RUNNING THE PROJECT.I M FACING SOME BLOCKAGE ABOUT NPM START..
 
below here i mentioned the error dailog how to resolve the issue
 
webpack-dev-server --mode development --open --hot
i ?wds?: Project is running at http://localhost:8001/
i ?wds?: webpack output is served from /
i ?wds?: Content not from webpack is served from D:\Sample C#\sample
× ?wdm?: Hash: 7e4cf408f502a728f687
Version: webpack 4.41.5
Time: 1673ms
Built at: 2020-01-03 13:24:27
Asset Size Chunks Chunk Names
index.html 272 bytes [emitted]
index_bundle.js 392 KiB main [emitted] main
Entrypoint main = index_bundle.js
[0] multi (webpack)-dev-server/client?http://localhost:8001 (webpack)/hot/dev-server.js ./main.js 52 bytes {main} [built]
[./main.js] 1.27 KiB {main} [built] [failed] [1 error]
[./node_modules/webpack-dev-server/client/index.js?http://localhost:8001] (webpack)-dev-server/client?http://localhost:8001 4.29 KiB {main} [built]
[./node_modules/webpack-dev-server/client/overlay.js] (webpack)-dev-server/client/overlay.js 3.51 KiB {main} [built]
[./node_modules/webpack-dev-server/client/socket.js] (webpack)-dev-server/client/socket.js 1.53 KiB {main} [built]
[./node_modules/webpack-dev-server/client/utils/createSocketUrl.js] (webpack)-dev-server/client/utils/createSocketUrl.js 2.91 KiB {main} [built]
[./node_modules/webpack-dev-server/client/utils/log.js] (webpack)-dev-server/client/utils/log.js 964 bytes {main} [built]
[./node_modules/webpack-dev-server/client/utils/reloadApp.js] (webpack)-dev-server/client/utils/reloadApp.js 1.59 KiB {main} [built]
[./node_modules/webpack-dev-server/client/utils/sendMessage.js] (webpack)-dev-server/client/utils/sendMessage.js 402 bytes {main} [built]
[./node_modules/webpack-dev-server/node_modules/strip-ansi/index.js] (webpack)-dev-server/node_modules/strip-ansi/index.js 161 bytes {main} [built]
[./node_modules/webpack/hot sync ^\.\/log$] (webpack)/hot sync nonrecursive ^\.\/log$ 170 bytes {main} [built]
[./node_modules/webpack/hot/dev-server.js] (webpack)/hot/dev-server.js 1.59 KiB {main} [built]
[./node_modules/webpack/hot/emitter.js] (webpack)/hot/emitter.js 75 bytes {main} [built]
[./node_modules/webpack/hot/log-apply-result.js] (webpack)/hot/log-apply-result.js 1.27 KiB {main} [built]
[./node_modules/webpack/hot/log.js] (webpack)/hot/log.js 1.34 KiB {main} [built]
+ 20 hidden modules
ERROR in ./main.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: Plugin/Preset files are not allowed to export objects, only functions. In D:\Sample C#\sample\node_modules\babel-preset-es2015\lib\index.js
at createDescriptor (D:\Sample C#\sample\node_modules\@babel\core\lib\config\config-descriptors.js:178:11)
at items.map (D:\Sample C#\sample\node_modules\@babel\core\lib\config\config-descriptors.js:109:50)
at Array.map (<anonymous>)
at createDescriptors (D:\Sample C#\sample\node_modules\@babel\core\lib\config\config-descriptors.js:109:29)
at createPresetDescriptors (D:\Sample C#\sample\node_modules\@babel\core\lib\config\config-descriptors.js:101:10)
at passPerPreset (D:\Sample C#\sample\node_modules\@babel\core\lib\config\config-descriptors.js:58:96)
at cachedFunction (D:\Sample C#\sample\node_modules\@babel\core\lib\config\caching.js:32:19)
at presets.presets (D:\Sample C#\sample\node_modules\@babel\core\lib\config\config-descriptors.js:29:84)
at mergeChainOpts (D:\Sample C#\sample\node_modules\@babel\core\lib\config\config-chain.js:320:26)
at D:\Sample C#\sample\node_modules\@babel\core\lib\config\config-chain.js:283:7
Child HtmlWebpackCompiler:
1 asset
Entrypoint HtmlWebpackPlugin_0 = __child-HtmlWebpackPlugin_0
[./node_modules/html-webpack-plugin/lib/loader.js!./index.html] 448 bytes {HtmlWebpackPlugin_0} [built]
[./node_modules/lodash/lodash.js] 528 KiB {HtmlWebpackPlugin_0} [built]
[./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 472 bytes {HtmlWebpackPlugin_0} [built]
[./node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 497 bytes {HtmlWebpackPlugin_0} [built]
i ?wdm?: Failed to compile.

Answers (4)