Could not find preinstalled "es2015" relative to "web / static / js" directory

I am trying to create a roaming server to work with elixir and phoenix, but after installing all the requirements and dependencies and when mix phoenix.server I get the following error:

Mistake

: Failed to compile "web / static / js / app.js". Could not find preinstalled "es2015" relative to directory "web / static / js";

I'm not sure about the "preset" context here, I hope a more experienced phoenix user will know what he gets.

Some runaway Google gave me nothing but how it could have been connected with babel.

Edit: I just tried installing what I consider to be the missing package, sudo npm install babel-preset-es2015 -g , but it did not resolve the error.

+38
elixir phoenix-framework
Dec 17 '15 at 22:34
source share
4 answers

See the fix here: https://github.com/phoenixframework/phoenix/issues/1410

  • Update to node> = v5.0.0
  • npm cache clean
  • cd my_app
  • rm -rf node_modules /
  • npm install
  • mix phoenix.server
+62
Dec 17 '15 at 23:12
source share

I see that the answer has already been accepted here. I just ran into the same error and tried the Chris solution posted above. This did not work for me, but based on the github Chris theme link above, I found a solution that worked for me.

I found that you do not have to use node v5.0 +. I am using node 4.4.3 LTS and everything works.

npm install --save-dev babel-preset-es2015

+7
Apr 21 '16 at 2:31 on
source share

My solution that works fine:

 .pipe(babel({ presets: [require('babel-preset-es2015')] })) 

Thank!

+2
04 Oct '16 at 6:34
source share

The accepted answer did not work for me.

I had to remove .babelrc in the parent directories of my application.

0
Jun 05 '16 at 19:36
source share



All Articles