如何在babel中设置文件 [英] How to set in out file in babel

查看:91
本文介绍了如何在babel中设置文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

设置路径时此类错误产生



路径必须是字符串。收到未定义的巴贝尔



设置React Js IN / Out文件的锄头



我正在使用这段代码在cmd



E:\ ABC> npx babel src / abc.js --out-file public / scripts / aa.js - 预设= env,反应



我尝试过:



 路径必须是字符串。收到未定义的babel  

解决方案

参见路径必须是字符串。收到未定义·问题#144·zkat / npx·GitHub [ ^ ]:

Quote:

this应该用npm@5.8.0(如果使用捆绑的npx)和npx @ 10(如果你使用独立的npx安装)修复。


When am set path this type error generated

path must be a string. received undefined babel

Hoe to set React Js IN/Out file

am using this code in cmd

E:\ABC>npx babel src/abc.js --out-file public/scripts/aa.js --preset=env,react

What I have tried:

path must be a string. received undefined babel

解决方案

See "Path must be a string. Received undefined" · Issue #144 · zkat/npx · GitHub[^]:

Quote:

This should have been fixed with npm@5.8.0 (if using the bundled npx) and npx@10 (if you're using a standalone npx install).


这篇关于如何在babel中设置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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