notablemind / jupyter-nodejs

A node.js kernel for jupyter/ipython
http://nbviewer.ipython.org/gist/jaredly/404a36306fdee6a1737a
MIT License
682 stars 70 forks source link

Error: Cannot find module 'babel-runtime/core-js/get-iterator' #37

Closed tomnewport closed 7 years ago

tomnewport commented 7 years ago

I've git cloned the repository, built and run the image from Dockerfile and then opened up a new Jupyter notebook. If I then add the following two cells:

%load_ext babel

%%babel
let iter = [1,2,3];
for(let x of iter){}

The following error is raised:

Error: Cannot find module 'babel-runtime/core-js/get-iterator'
    at Function.Module._resolveFilename (module.js:455:15)
    at Function.Module._load (module.js:403:25)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at /home/jovyan/jupyter-nodejs/build/context.js:73:16
    at require (/home/jovyan/jupyter-nodejs/build/context.js:53:27)
    at Object.Contextify.sandbox.run (/home/jovyan/jupyter-nodejs/node_modules/contextify/lib/contextify.js:12:24)
    at Context.rawRun (/home/jovyan/jupyter-nodejs/build/context.js:168:23)
    at Domain.<anonymous> (/home/jovyan/jupyter-nodejs/build/context.js:188:27)
    at Domain.run (domain.js:221:14)
banduk commented 7 years ago

@tomnewport Have you solved this? I figured out the problem was I was running the script as $NB_USER. Running as root it works ok (but as root =/)

tomnewport commented 7 years ago

Unfortunately I ran out of time and had to give up - I'll have a go and see if your solution works this weekend.

jaredly commented 7 years ago

I just added the babel-runtime package that was missing -- this should work now! let me know if it doesn't