n-riesco / jp-babel

jp-babel is a babel kernel for the Jupyter notebook
Other
86 stars 16 forks source link

Error: Couldn't find preset "es2015" #2

Closed n-riesco closed 7 years ago

n-riesco commented 8 years ago

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 with babel-preset-es2015:

npm install jp-babel babel-preset-es2015
n-riesco commented 8 years ago

Reported the issue on the Babel tracker: https://github.com/babel/babel/issues/2974

brabeji commented 8 years ago

Hello, the issue no longer seems to be existing. I ran into this today, any info appreciated!

n-riesco commented 8 years ago

@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.

brabeji commented 8 years ago

@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.

ghost commented 8 years ago

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.

n-riesco commented 8 years ago

@rainyday

Another workaround is to install jp-babel v0.0.6, which uses Babel v5:

npm install -g jp-babel@0.0.6
rgbkrk commented 8 years ago

Whoa. They full on took down their issues board. Can't even read that issue anymore.

n-riesco commented 8 years ago

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).

rgbkrk commented 8 years ago

Thanks @n-riesco! I didn't imagine you forgot about it, I was digging around while starting to use jp-babel. Love your stuff.

slavaGanzin commented 8 years ago

It works for me if I install babel-preset-es2015 into project folder. Is this ok?

n-riesco commented 8 years ago

@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.

rgbkrk commented 8 years ago

Babel 5 - plugins included Babel 6 - choose your own adventure

Eein commented 8 years ago

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