Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
624 views
in Technique[技术] by (71.8m points)

elixir - Couldn't find preset "es2015" relative to directory "web/static/js"

I'm trying to build a vagrant server for dabbling with elixir and phoenix, but after installing all requirements and dependencies, and on running mix phoenix.server I'm getting the following error:

error: Compiling of 'web/static/js/app.js' failed. Couldn't find preset "es2015" relative to directory "web/static/js" ;

I'm not sure of the context of 'preset' here, I'm hoping a more seasoned phoenix user will know what it's getting at.

Some cursory Google's gave me nothing, other than it might be something to do with babel.

Edit: I just tried installing what I assume to be the missing package, sudo npm install babel-preset-es2015 -g, but it hasn't resolved the error.

question from:https://stackoverflow.com/questions/34345573/couldnt-find-preset-es2015-relative-to-directory-web-static-js

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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

  1. Upgrade to node >= v5.0.0
  2. npm cache clean
  3. cd my_app
  4. rm -rf node_modules/
  5. npm install
  6. mix phoenix.server

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...