Closed n-riesco closed 7 years ago
Reported the issue on the Babel tracker: https://github.com/babel/babel/issues/2974
Hello, the issue no longer seems to be existing. I ran into this today, any info appreciated!
@brabeji Unfortunately, the issue at the babel repository has been closed. I'm taking the closure as an indication that the use I'm making of require("babel-core").transform()
is not supported.
For the time being, I recommend the workaround of installing explicitly babel-preset-es2015
:
npm install jp-babel babel-preset-es2015
Please, let me know if this workaround doesn't work for you.
I will address this issue after I complete some changes in the IJavascript
kernel and merge those changes into jp-babel
.
@n-riesco Thank you for response. Actually I am not using jq-babel
but the issue is the same. I am working on my library of webpack
configurations where I need to depend on babel presets. Unfortunately, those are resolved relatively to the actual project to which my config lib is installed so it does not work. I believe this is issue with babel-core
, not jq-babel
and could be resolved by providing some config option to set modules directory for presets.
Installing babel-preset-es2015 globally (at least on windows) as suggested in the readme doesn't work, the only way I managed to get things up and running was to install it locally in the directory jp-babel is run from.
@rainyday
Another workaround is to install jp-babel v0.0.6, which uses Babel v5:
npm install -g jp-babel@0.0.6
Whoa. They full on took down their issues board. Can't even read that issue anymore.
I think they just moved to a different tracker:
https://phabricator.babeljs.io/
PS: I haven't forgotten about this issue. I will address it after I'm done refactoring the NEL package (so that jp-babel and jp-coffeescript can reuse more of its code).
Thanks @n-riesco! I didn't imagine you forgot about it, I was digging around while starting to use jp-babel. Love your stuff.
It works for me if I install babel-preset-es2015
into project folder. Is this ok?
@slavaGanzin Judging by the comments in the issue on Babel's issue tracker that is the expected behaviour.
I don't think it's very convenient, though.
Babel 5 - plugins included Babel 6 - choose your own adventure
I figured out a solution to a similar issue with mac. You shouldn't need to install anything globally, the issue in my case resided with the fact that there was a .babelrc in my home folder. If you delete it, the problem should go away..
My explanation for this problem here: https://github.com/phoenixframework/phoenix/issues/1410#issuecomment-188433791
See #1 for an initial report.
This bug is triggered when
babel-preset-es2015
is installed as a nested dependency.To work around this issue, install
jp-babel
along withbabel-preset-es2015
: