Chapter 15 - Issue while trying to do the build


#1

Hi,

I am encountering the following issue while trying to do a build.

In my terminal I execute the following command

./node_modules/.bin/webpack

192-168-1-7:MyTotallyAwesomeApp kavitha$ ./node_modules/.bin/webpack
Hash: a2a2ea817292117bd519
Version: webpack 2.5.1
Time: 74ms
    Asset     Size  Chunks             Chunk Names
myCode.js  5.38 kB       0  [emitted]  main
   [0] ./dev/index.jsx 2.75 kB {0} [built] [failed] [1 error]

ERROR in ./dev/index.jsx
Module build failed: Error: Cannot find module 'babel-core'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/kavitha/varunprasadyg/React/MyTotallyAwesomeApp/node_modules/babel-loader/lib/index.js:3:13)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at loadLoader (/Users/kavitha/varunprasadyg/React/MyTotallyAwesomeApp/node_modules/loader-runner/lib/loadLoader.js:13:17)
    at iteratePitchingLoaders (/Users/kavitha/varunprasadyg/React/MyTotallyAwesomeApp/node_modules/loader-runner/lib/LoaderRunner.js:169:2)
    at runLoaders (/Users/kavitha/varunprasadyg/React/MyTotallyAwesomeApp/node_modules/loader-runner/lib/LoaderRunner.js:362:2)
    at NormalModule.doBuild (/Users/kavitha/varunprasadyg/React/MyTotallyAwesomeApp/node_modules/webpack/lib/NormalModule.js:179:3)
    at NormalModule.build (/Users/kavitha/varunprasadyg/React/MyTotallyAwesomeApp/node_modules/webpack/lib/NormalModule.js:268:15)
    at Compilation.buildModule (/Users/kavitha/varunprasadyg/React/MyTotallyAwesomeApp/node_modules/webpack/lib/Compilation.js:146:10)
    at moduleFactory.create (/Users/kavitha/varunprasadyg/React/MyTotallyAwesomeApp/node_modules/webpack/lib/Compilation.js:433:9)
    at factory (/Users/kavitha/varunprasadyg/React/MyTotallyAwesomeApp/node_modules/webpack/lib/NormalModuleFactory.js:253:5)
    at applyPluginsAsyncWaterfall (/Users/kavitha/varunprasadyg/React/MyTotallyAwesomeApp/node_modules/webpack/lib/NormalModuleFactory.js:99:14)
    at /Users/kavitha/varunprasadyg/React/MyTotallyAwesomeApp/node_modules/tapable/lib/Tapable.js:204:11
    at NormalModuleFactory.params.normalModuleFactory.plugin (/Users/kavitha/varunprasadyg/React/MyTotallyAwesomeApp/node_modules/webpack/lib/CompatibilityPlugin.js:52:5)
    at NormalModuleFactory.applyPluginsAsyncWaterfall (/Users/kavitha/varunprasadyg/React/MyTotallyAwesomeApp/node_modules/tapable/lib/Tapable.js:208:13)
    at resolver (/Users/kavitha/varunprasadyg/React/MyTotallyAwesomeApp/node_modules/webpack/lib/NormalModuleFactory.js:74:11)
    at process.nextTick (/Users/kavitha/varunprasadyg/React/MyTotallyAwesomeApp/node_modules/webpack/lib/NormalModuleFactory.js:205:8)
    at _combinedTickCallback (internal/process/next_tick.js:73:7)
    at process._tickCallback (internal/process/next_tick.js:104:9)

This is my folder structure

Can someone help me out on this ?