StephenGrider / ReduxSimpleStarter

Starter pack for an awesome Udemy course

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

webpack: Failed to compile.

hozefanykaa opened this issue · comments

redux-simple-starter@1.0.0 start /var/www/ReduxSimpleStarter
node ./node_modules/webpack-dev-server/bin/webpack-dev-server.js

http://localhost:8080/webpack-dev-server/
webpack result is served from /
content is served from ./
404s will fallback to /index.html
Hash: d437a155a1da4cdfeeeb
Version: webpack 1.15.0
Time: 459ms
Asset Size Chunks Chunk Names
bundle.js 1.51 kB 0 [emitted] main
chunk {0} bundle.js (main) 28 bytes [rendered]
[0] multi main 28 bytes {0} [built] [1 error]

ERROR in ./src/index.js
Module build failed: Error: Couldn't find preset "stage-1" relative to directory "/var/www/ReduxSimpleStarter"
at /var/www/ReduxSimpleStarter/node_modules/babel-core/lib/transformation/file/options/option-manager.js:293:19
at Array.map (native)
at OptionManager.resolvePresets (/var/www/ReduxSimpleStarter/node_modules/babel-core/lib/transformation/file/options/option-manager.js:275:20)
at OptionManager.mergePresets (/var/www/ReduxSimpleStarter/node_modules/babel-core/lib/transformation/file/options/option-manager.js:264:10)
at OptionManager.mergeOptions (/var/www/ReduxSimpleStarter/node_modules/babel-core/lib/transformation/file/options/option-manager.js:249:14)
at OptionManager.init (/var/www/ReduxSimpleStarter/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
at File.initOptions (/var/www/ReduxSimpleStarter/node_modules/babel-core/lib/transformation/file/index.js:212:65)
at new File (/var/www/ReduxSimpleStarter/node_modules/babel-core/lib/transformation/file/index.js:135:24)
at Pipeline.transform (/var/www/ReduxSimpleStarter/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
at transpile (/var/www/ReduxSimpleStarter/node_modules/babel-loader/lib/index.js:46:20)
@ multi main
webpack: Failed to compile.

commented

Is this happening when you write npm run start command ?

commented

I had a same problem with npm start app command but with npm run start on my computer everything works fine. Try to remove node_modules from project and add them again with npm i , then try npm run start. Hope it helps :)

The port (8080) is in use, more than likely a previous session you didn't fully close.

You need to kill the node task for that session, change the port number webpack-dev-server is using or just restart your pc (assuming you don't have some other service using that port that will restart on login)