Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialjulian hoogendoorn
3,382 PointsBabel-core missing along with a load of other stuff
Npm run build isnt working like it should, despite following the instructions to the point. I get a bunch of errors indicating that files are missing. Please help!
iTerm error: ''' ➜ webpack-workshop git:(lesson-03-first-application) npm run build
webpack-treehouse-example@0.0.1 build /Users/j/Code/React/webpack-workshop webpack --optimize-minimize
Hash: 396f0bfb9d565b6f60f0 Version: webpack 1.13.2 Time: 349ms Asset Size Chunks Chunk Names index.html 3.03 kB [emitted] + 1 hidden modules
ERROR in Cannot find module 'babel-core'
ERROR in Error: Child compilation failed: Cannot find module 'babel-core'
compiler.js:76 [webpack-workshop]/[html-webpack-plugin]/lib/compiler.js:76:16
Compiler.js:214 Compiler.<anonymous> [webpack-workshop]/[webpack]/lib/Compiler.js:214:10
Compiler.js:403 [webpack-workshop]/[webpack]/lib/Compiler.js:403:12
Tapable.js:67 Compiler.next [webpack-workshop]/[tapable]/lib/Tapable.js:67:11
CachePlugin.js:40 Compiler.<anonymous> [webpack-workshop]/[webpack]/lib/CachePlugin.js:40:4
Tapable.js:71 Compiler.applyPluginsAsync [webpack-workshop]/[tapable]/lib/Tapable.js:71:13
Compiler.js:400 Compiler.<anonymous> [webpack-workshop]/[webpack]/lib/Compiler.js:400:9
Compilation.js:577 Compilation.<anonymous> [webpack-workshop]/[webpack]/lib/Compilation.js:577:13
Tapable.js:60 Compilation.applyPluginsAsync [webpack-workshop]/[tapable]/lib/Tapable.js:60:69
Compilation.js:572 Compilation.<anonymous> [webpack-workshop]/[webpack]/lib/Compilation.js:572:10
Tapable.js:67 Compilation.next [webpack-workshop]/[tapable]/lib/Tapable.js:67:11
UglifyJsPlugin.js:140 Compilation.<anonymous> [webpack-workshop]/[webpack]/lib/optimize/UglifyJsPlugin.js:140:4
Tapable.js:71 Compilation.applyPluginsAsync [webpack-workshop]/[tapable]/lib/Tapable.js:71:13
Compilation.js:567 Compilation.<anonymous> [webpack-workshop]/[webpack]/lib/Compilation.js:567:9
Tapable.js:60 Compilation.applyPluginsAsync [webpack-workshop]/[tapable]/lib/Tapable.js:60:69
Compilation.js:563 Compilation.<anonymous> [webpack-workshop]/[webpack]/lib/Compilation.js:563:8
Tapable.js:60 Compilation.applyPluginsAsync [webpack-workshop]/[tapable]/lib/Tapable.js:60:69
Compilation.js:525 Compilation.seal [webpack-workshop]/[webpack]/lib/Compilation.js:525:7
Compiler.js:397 Compiler.<anonymous> [webpack-workshop]/[webpack]/lib/Compiler.js:397:15
Tapable.js:103 [webpack-workshop]/[tapable]/lib/Tapable.js:103:11
Compilation.js:445 Compilation.<anonymous> [webpack-workshop]/[webpack]/lib/Compilation.js:445:10
Compilation.js:417 [webpack-workshop]/[webpack]/lib/Compilation.js:417:12
Compilation.js:332 [webpack-workshop]/[webpack]/lib/Compilation.js:332:10
async.js:52 [webpack-workshop]/[webpack]/[async]/lib/async.js:52:16
async.js:246 done [webpack-workshop]/[webpack]/[async]/lib/async.js:246:17
async.js:44 [webpack-workshop]/[webpack]/[async]/lib/async.js:44:16
Compilation.js:202 errorAndCallback [webpack-workshop]/[webpack]/lib/Compilation.js:202:5
Compilation.js:225 errorOrWarningAndCallback [webpack-workshop]/[webpack]/lib/Compilation.js:225:13
Compilation.js:311 [webpack-workshop]/[webpack]/lib/Compilation.js:311:13
Compilation.js:123 [webpack-workshop]/[webpack]/lib/Compilation.js:123:4
Child html-webpack-plugin for "index.html": + 2 hidden modules
ERROR in Cannot find module 'babel-core'
@ ./~/html-webpack-plugin/lib/loader.js!./src/index.ejs 1:8-53
'''
2 Answers
Alexander Nikiforov
Java Web Development Techdegree Graduate 22,175 PointsLooks like you need to install babel-core
...
Have you tried that?
https://babeljs.io/blog/2015/10/31/setting-up-babel-6
Command from there:
npm install --save-dev babel-core
julian hoogendoorn
3,382 PointsThanks Alex!
I was assuming the babel-core would be installed along with the npm install, your solution worked for me :)