Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
716 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 Reply

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...