owenashurst / agar.io-clone

Agar.io clone written with Socket.IO and HTML5 canvas
MIT License
2.88k stars 1.12k forks source link

I can't `gulp run` , help me please. #462

Closed heyfirst closed 7 years ago

heyfirst commented 7 years ago

I already clone this repo and npm install

but ..

~/P/H/agar.io-clone ❯❯❯ gulp run                                                     ⏎
[19:05:51] Using gulpfile ~/Project/HelloWorld/agar.io-clone/gulpfile.js
[19:05:51] Starting 'lint'...
[19:05:51] Starting 'move-client'...
[19:05:53] Finished 'lint' after 2.2 s
[19:05:53] Starting 'build-server'...
[19:05:53] Starting 'test'...
[19:05:53] Finished 'test' after 7.29 ms
[19:05:53] Starting 'todo'...
[19:05:53] Finished 'todo' after 3.45 ms

events.js:160
      throw er; // Unhandled 'error' event
      ^
Error: Couldn't find preset "es2015" relative to directory "/Users/KS/Project"
    at /Users/KS/Project/HelloWorld/agar.io-clone/node_modules/babel-core/lib/transformation/file/options/option-manager.js:294:19
    at Array.map (native)
    at OptionManager.resolvePresets (/Users/KS/Project/HelloWorld/agar.io-clone/node_modules/babel-core/lib/transformation/file/options/option-manager.js:265:20)
    at OptionManager.mergePresets (/Users/KS/Project/HelloWorld/agar.io-clone/node_modules/babel-core/lib/transformation/file/options/option-manager.js:254:10)
    at OptionManager.mergeOptions (/Users/KS/Project/HelloWorld/agar.io-clone/node_modules/babel-core/lib/transformation/file/options/option-manager.js:239:14)
    at OptionManager.init (/Users/KS/Project/HelloWorld/agar.io-clone/node_modules/babel-core/lib/transformation/file/options/option-manager.js:359:12)
    at File.initOptions (/Users/KS/Project/HelloWorld/agar.io-clone/node_modules/babel-core/lib/transformation/file/index.js:221:65)
    at new File (/Users/KS/Project/HelloWorld/agar.io-clone/node_modules/babel-core/lib/transformation/file/index.js:141:24)
    at Pipeline.transform (/Users/KS/Project/HelloWorld/agar.io-clone/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
    at DestroyableTransform._transform (/Users/KS/Project/HelloWorld/agar.io-clone/node_modules/gulp-babel/index.js:37:20)

I found the error with google but I didn't find a fix solution.

help me please : (

ghost commented 7 years ago

It looks like npm install didn't install the package babel-preset-es2015, try installing it manually…

heyfirst commented 7 years ago

I already install it but not working.

~/P/agar.io-clone ❯❯❯ npm install babel-preset-es2015 -S                             ⏎
agar-clone@1.0.0 /Users/KS/Project/agar.io-clone
└── babel-preset-es2015@6.16.0 

~/P/agar.io-clone ❯❯❯ npm start

> agar-clone@1.0.0 start /Users/KS/Project/agar.io-clone
> gulp run

[19:31:18] Using gulpfile ~/Project/agar.io-clone/gulpfile.js
[19:31:18] Starting 'lint'...
[19:31:18] Starting 'move-client'...
[19:31:21] Finished 'lint' after 2.63 s
[19:31:21] Starting 'build-server'...
[19:31:21] Starting 'test'...
[19:31:21] Finished 'test' after 3.85 ms
[19:31:21] Starting 'todo'...
[19:31:21] Finished 'todo' after 4.44 ms

events.js:160
      throw er; // Unhandled 'error' event
      ^
Error: Couldn't find preset "es2015" relative to directory "/Users/KS/Project"
    at /Users/KS/Project/agar.io-clone/node_modules/babel-core/lib/transformation/file/options/option-manager.js:294:19
    at Array.map (native)
    at OptionManager.resolvePresets (/Users/KS/Project/agar.io-clone/node_modules/babel-core/lib/transformation/file/options/option-manager.js:265:20)
    at OptionManager.mergePresets (/Users/KS/Project/agar.io-clone/node_modules/babel-core/lib/transformation/file/options/option-manager.js:254:10)
    at OptionManager.mergeOptions (/Users/KS/Project/agar.io-clone/node_modules/babel-core/lib/transformation/file/options/option-manager.js:239:14)
    at OptionManager.init (/Users/KS/Project/agar.io-clone/node_modules/babel-core/lib/transformation/file/options/option-manager.js:359:12)
    at File.initOptions (/Users/KS/Project/agar.io-clone/node_modules/babel-core/lib/transformation/file/index.js:221:65)
    at new File (/Users/KS/Project/agar.io-clone/node_modules/babel-core/lib/transformation/file/index.js:141:24)
    at Pipeline.transform (/Users/KS/Project/agar.io-clone/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
    at DestroyableTransform._transform (/Users/KS/Project/agar.io-clone/node_modules/gulp-babel/index.js:37:20)
heyfirst commented 7 years ago

node -v v6.6.0

npm -v 3.10.8

heyfirst commented 7 years ago

Now. I already fix it : ) because in "/Users/KS/Project" have .babelrc , I remove then it's working.

Thank you so much @wb9688 👍