Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Failed to load the jupiter-notebook package": Unexpected token #30

Closed
aechase opened this issue Jan 14, 2016 · 19 comments
Closed

"Failed to load the jupiter-notebook package": Unexpected token #30

aechase opened this issue Jan 14, 2016 · 19 comments

Comments

@aechase
Copy link

aechase commented Jan 14, 2016

  1. I successfully installed the developer version (thanks to advice gleaned from Installing “jupyter-notebook@0.0.6” failed. #23):
git clone https://github.com/jupyter/atom-notebook.git
cd atom-notebook
PYTHON=python2.7 apm install
apm link
  1. When I open Atom, I get the following failure-to-load error. The error message links me to "Failed to load the jupyter-notebook package" on Atom 1.1.0 #8, but I don't think these issues are actually the same.
  2. I also tried uninstalling the package in Atom, and then reinstalling via PYTHON=python2.7 apm install jupyter-notebook (that is, downloading the package and not using the cloned repo). I still get the same error.

Atom Version: 1.4.0
System: Mac OS X 10.11.2
Thrown From: jupyter-notebook package, v0.0.8

Stack Trace

Failed to load the jupyter-notebook package

At Unexpected token .

SyntaxError: Unexpected token .
    at Module._compile (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:77:42)
    at Object.defineProperty.value [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:208:21)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:50:27)
    at Object.<anonymous> (/Users/alexchase/atom-notebook/node_modules/jupyter-js-services/node_modules/jupyter-js-utils/lib/dialog.js:3:1)
    at Module._compile (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:103:30)
    at Object.defineProperty.value [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:208:21)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:50:27)
    at Object.<anonymous> (/Users/alexchase/atom-notebook/node_modules/jupyter-js-services/node_modules/jupyter-js-utils/lib/index.js:7:10)
    at Module._compile (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:103:30)
    at Object.defineProperty.value [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:208:21)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:50:27)
    at Object.<anonymous> (/Users/alexchase/atom-notebook/node_modules/jupyter-js-services/lib/config.js:3:13)
    at Module._compile (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:103:30)
    at Object.defineProperty.value [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:208:21)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:50:27)
    at Object.<anonymous> (/Users/alexchase/atom-notebook/node_modules/jupyter-js-services/lib/index.js:7:10)
    at Module._compile (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:103:30)
    at Object.defineProperty.value [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:208:21)

Commands

Config

{
  "core": {}
}

Installed Packages

# User
jupyter-notebook, v0.0.8

# Dev
No dev packages
@maxxk
Copy link

maxxk commented Jan 14, 2016

If you write require('<path-to-sources>/atom-notebook/lib/main.js') in Atom devtools console, it gives the location of error:
atom-notebook/node_modules/jupyter-js-services/node_modules/jupyter-js-utils/lib/dialog.css:6

It is probably related to: https://github.com/jupyter/jupyter-js-utils/blob/master/src/dialog.ts#L8

@gnestor
Copy link
Contributor

gnestor commented Jan 14, 2016

Opened an issue at jupyter/jupyter-js-utils#20

@blink1073
Copy link

Right, all of the jupyter-js-* repos assume the ability to require() a css file by name, which is provided by loaders such as Webpack and SystemJS, I'll update the readme to reflect this.

@gnestor
Copy link
Contributor

gnestor commented Jan 14, 2016

Interesting... I'm not running into this problem but @maxxk is. We're obviously not running Webpack or SystemJS in atom-notebook, we're simply importing/requiring jupyter-js-services (

). Any ideas??

@blink1073
Copy link

Jupyter-js-services relies on jupyter-js-utils, which as a require()d css file, dialog.css.

@blink1073
Copy link

I think this may warrant splitting utils into those requiring css and those not requiring it, so that jupyter-js-services can continue to be used in a node context.

@gnestor
Copy link
Contributor

gnestor commented Jan 14, 2016

Agreed. Let me know if you need my assistance 👍

@blink1073
Copy link

@jasongrout, shall we make another repo called something like jupyter-js-graphical-utils or jupyter-js-visual-utils?

@blink1073
Copy link

@minrk, same question ^^

@minrk
Copy link
Member

minrk commented Jan 15, 2016

@blink1073 for things like the dialogs? I suppose so, since they are used by multiple applications. I might say gui-utils.

@blink1073
Copy link

Yep, anything that requires the DOM or css, gui-utils sounds good.

@jasongrout
Copy link
Member

We just made https://github.com/jupyter/jupyter-js-domutils. @blink1073 - you have permission to push to it.

@blink1073
Copy link

Should be fixed by depending on "jupyter-js-utils": "^0.4.0".

@gnestor
Copy link
Contributor

gnestor commented Jan 15, 2016

Great! @blink1073 atom-notebook depends on jupyter-js-services, so would you like to me to submit a PR of jupyter-js-services that depends on this new version of jupyter-js-utils? Or would you like to do it?

@blink1073
Copy link

Oh, sorry, that should say "jupyter-js-services": "^0.4.0", which already depends on the updated js-utils.

@gnestor
Copy link
Contributor

gnestor commented Jan 15, 2016

👌

@gnestor
Copy link
Contributor

gnestor commented Jan 15, 2016

@aechase @maxxk ee702ce should fix this. Either update jupyter-notebook to 0.0.9 inside of Atom or clone the current repo. Let me know if this solves it...

@aechase
Copy link
Author

aechase commented Jan 18, 2016

@gnestor Solved! I can now install and load using PYTHON=python2.7 apm install jupyter-notebook. Thanks for the quick work, everyone.

@gnestor
Copy link
Contributor

gnestor commented Jan 18, 2016

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants