找不到预设的"es2015"相对于目录"web/static/js" [英] Couldn't find preset "es2015" relative to directory "web/static/js"

查看:60
本文介绍了找不到预设的"es2015"相对于目录"web/static/js"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试构建一个流浪者服务器,用于涉足elixir和phoenix,但是在安装所有要求和依赖项之后,并且在运行mix phoenix.server时,出现以下错误:

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:

错误:"web/static/js/app.js"的编译失败.找不到相对于目录"web/static/js"的预设"es2015";

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.

一些粗略的Google程序什么都没给我,除了可能与babel有关.

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

我只是尝试安装我认为是缺少的软件包sudo npm install babel-preset-es2015 -g,但它没有解决错误.

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.

推荐答案

请在此处查看修复程序: https://github.com/phoenixframework/phoenix/issues/1410

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

  1. 升级到节点> = v5.0.0
  2. npm缓存清理
  3. cd my_app
  4. rm -rf node_modules/
  5. npm安装
  6. 混合phoenix.server

这篇关于找不到预设的"es2015"相对于目录"web/static/js"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆