atom-notebook icon indicating copy to clipboard operation
atom-notebook copied to clipboard

Failed to load the jupyter-notebook package

Open 16007005 opened this issue 4 years ago • 22 comments

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.47.0 x64 Electron: 5.0.13 OS: Unknown Windows version Thrown From: jupyter-notebook package 0.0.10

Stack Trace

Failed to load the jupyter-notebook package

At Cannot find module 'react'
Require stack:
- C:\Users\Administrator\.atom\packages\atom-notebook\lib\main.js
- C:\Users\Administrator\AppData\Local\atom\app-1.47.0\resources\app.asar\static\index.html

Error: Cannot find module 'react'
Require stack:
- C:\Users\Administrator\.atom\packages\atom-notebook\lib\main.js
- C:\Users\Administrator\AppData\Local\atom\app-1.47.0\resources\app.asar\static\index.html
    at Module._resolveFilename (internal/modules/cjs/loader.js:683:15)
    at Module._resolveFilename (~/AppData/Local/atom/app-1.47.0/resources/electron.asar/common/reset-search-paths.js:43:12)
    at Function.get_Module._resolveFilename (~/AppData/Local/atom/app-1.47.0/resources/app/static/<embedded>:11:155434)
    at Module.require (/app.asar/static/index.js:61:43)
    at require (~/AppData/Local/atom/app-1.47.0/resources/app/static/<embedded>:11:146766)
    at /packages/atom-notebook/lib/main.js:7:14)
    at /packages/atom-notebook/lib/main.js:90:2)
    at Module.get_Module._compile (~/AppData/Local/atom/app-1.47.0/resources/app/static/<embedded>:11:147450)
    at Object.value [as .js] (~/AppData/Local/atom/app-1.47.0/resources/app/static/<embedded>:11:150998)
    at Module.load (internal/modules/cjs/loader.js:701:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:633:12)
    at Function.Module._load (internal/modules/cjs/loader.js:625:3)
    at Module.require (/app.asar/static/index.js:72:46)
    at require (internal/modules/cjs/helpers.js:14:16)
    at customRequire (~/AppData/Local/atom/app-1.47.0/resources/app/static/<embedded>:1:735013)
    at Package.requireMainModule (~/AppData/Local/atom/app-1.47.0/resources/app/static/<embedded>:11:3310163)
    at ~/AppData/Local/atom/app-1.47.0/resources/app/static/<embedded>:11:3296703
    at Package.measure (~/AppData/Local/atom/app-1.47.0/resources/app/static/<embedded>:11:3295535)
    at Package.load (~/AppData/Local/atom/app-1.47.0/resources/app/static/<embedded>:11:3296276)
    at PackageManager.loadAvailablePackage (~/AppData/Local/atom/app-1.47.0/resources/app/static/<embedded>:11:381312)
    at ~/AppData/Local/atom/app-1.47.0/resources/app/static/<embedded>:11:379735
    at Config.transact (~/AppData/Local/atom/app-1.47.0/resources/app/static/<embedded>:11:331800)
    at PackageManager.loadPackages (~/AppData/Local/atom/app-1.47.0/resources/app/static/<embedded>:11:379673)
    at ~/AppData/Local/atom/app-1.47.0/resources/app/static/<embedded>:1:755624
    at async Promise.all (index 0)
    at AtomEnvironment.startEditorWindow (~/AppData/Local/atom/app-1.47.0/resources/app/static/<embedded>:1:757663)

Commands

Non-Core Packages

atom-ide-ui 0.13.0 
jupyter-notebook 0.0.10 
atom-python-run 0.9.7 
data-atom 0.29.1 
ide-python 1.5.0 
process-palette 0.17.0 
script 3.25.0 
teletype 0.13.4 

16007005 avatar Jun 08 '20 03:06 16007005

I had given the same issue some days ago. Can somebody please help us?

Amazeryogo avatar Jun 08 '20 11:06 Amazeryogo

yntaxError: /Users/user/.atom/packages/jupyter-notebook/lib/main.js: Unexpected token (36:4) return el; } }); }, deactivate() { at Parser.pp.raise (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/babylon/lib/parser/location.js:24:13) at Parser.pp.unexpected (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/babylon/lib/parser/util.js:82:8) at Parser.pp.expect (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/babylon/lib/parser/util.js:76:33) at Parser.pp.parseExprList (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/babylon/lib/parser/expression.js:785:12) at Parser.pp.parseSubscripts (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/babylon/lib/parser/expression.js:270:29) at Parser.pp.parseExprSubscripts (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/babylon/lib/parser/expression.js:240:17) at Parser.pp.parseMaybeUnary (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/babylon/lib/parser/expression.js:217:19) at Parser.pp.parseExprOps (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/babylon/lib/parser/expression.js:163:19) at Parser.pp.parseMaybeConditional (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/babylon/lib/parser/expression.js:145:19) at Parser.pp.parseMaybeAssign (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/babylon/lib/parser/expression.js:112:19) at Parser.pp.parseExpression (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/babylon/lib/parser/expression.js:79:19) at Parser.pp.parseStatement (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/babylon/lib/parser/statement.js:137:23) at Parser.parseStatement (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/babylon/lib/plugins/flow.js:655:22) at Parser.pp.parseBlock (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/babylon/lib/parser/statement.js:442:21) at Parser.pp.parseFunctionBody (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/babylon/lib/parser/expression.js:747:22) at Parser.parseFunctionBody (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/babylon/lib/plugins/flow.js:643:20) at Parser.pp.parseMethod (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/babylon/lib/parser/expression.js:717:8) at Parser.pp.parseObjPropValue (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/babylon/lib/parser/expression.js:658:23) at Parser.parseObjPropValue (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/babylon/lib/plugins/flow.js:891:13) at Parser.pp.parseObj (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/babylon/lib/parser/expression.js:640:10) at Parser.pp.parseExprAtom (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/babylon/lib/parser/expression.js:392:19) at Parser.parseExprAtom (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/babylon/lib/plugins/jsx/index.js:412:22) at Parser.pp.parseExprSubscripts (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/babylon/lib/parser/expression.js:236:19) at Parser.pp.parseMaybeUnary (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/babylon/lib/parser/expression.js:217:19) at Parser.pp.parseExprOps (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/babylon/lib/parser/expression.js:163:19) at Parser.pp.parseMaybeConditional (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/babylon/lib/parser/expression.js:145:19) at Parser.pp.parseMaybeAssign (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/babylon/lib/parser/expression.js:112:19) at Parser.pp.parseExport (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/babylon/lib/parser/statement.js:682:21) at Parser.parseExport (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/babylon/lib/plugins/flow.js:713:20) at Parser.pp.parseStatement (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/babylon/lib/parser/statement.js:115:90)

Amazeryogo avatar Jun 08 '20 11:06 Amazeryogo

I'm getting the same error on macOS 10.14.6, running Atom version 1.46.0. Non-core packages are:

hydrogen 2.14.1
aligner-lua 1.0.1
atom-julia-run 1.0.5
atom-language-r 1.4.8
busy-signal 2.0.1
graphviz-preview-plus 1.5.10
hydrogen-launcher 1.2.2
hyperclick 0.1.5
ide-r 0.1.8
indent-detective 0.4.0
ink 0.12.4
intentions 1.1.5
julia-client 0.12.5
juno-plus 0.12.2
jupyter-notebook 0.0.10
language-asymptote 1.1.0
language-dot 1.7.0
language-julia 0.19.3
language-lisp 0.2.0
language-lua 0.9.11
language-metapost 0.0.2
latex-completions 0.3.6
linter 2.3.1
linter-julia 0.8.3
linter-ui-default 1.8.1
platformio-die-terminal 2.10.0
r-exec 0.5.0
tool-bar 1.3.0
uber-juno 0.3.0

jakewilliami avatar Jun 08 '20 12:06 jakewilliami

I too use MacOS 10.14.6

Amazeryogo avatar Jun 08 '20 15:06 Amazeryogo

I guess this is solved, basically a wrong bracket issue. You can fix urself as well. Issue: #67

yalin avatar Jun 08 '20 16:06 yalin

@yalin Which one is solved?

Amazeryogo avatar Jun 09 '20 10:06 Amazeryogo

@yalin Which one is solved?

@Amazeryogo ; There is a mistaken bracket in the file main.js

quote from your post;

yntaxError: /Users/user/.atom/packages/jupyter-notebook/lib/main.js: Unexpected token (36:4) return el; } }); }, deactivate() {

Simply delete the one of the bracket "}" after "return el;" and save the file. Either "}" alone or "}" before ");"

So it should look like;

return el; } ); }, deactivate() {

yalin avatar Jun 09 '20 13:06 yalin

@yalin oh ok Thanks!

Amazeryogo avatar Jun 09 '20 15:06 Amazeryogo

how to write in that block ....we can't change that code

22vatsu avatar Jun 17 '20 13:06 22vatsu

have the same issue, hoe can i modify that file to delete the bracket?

Charlie5DH avatar Jul 20 '20 15:07 Charlie5DH

have the same issue, hoe can i modify that file to delete the bracket?

open the file in atom then edit and save it??

apw024 avatar Jul 20 '20 18:07 apw024

I tried @yalin 's fix, and I can now open notebooks inside atom, but they are incorrectly displayed. Here's a screenshot of what it looks like for me ( Atom v.1.49, MacOS 10.13.4): delete

aaronfoe avatar Jul 22 '20 13:07 aaronfoe

I tried @yalin 's fix, and I can now open notebooks inside atom, but they are incorrectly displayed. Here's a screenshot of what it looks like for me ( Atom v.1.49, MacOS 10.13.4): delete

+1 on this, after removing one of the "}'"s, I get a very similar display issue.

apophenist avatar Aug 05 '20 08:08 apophenist

Hey guys same problems here, this fix didnt work, I also have the same display issue.

lhoupert avatar Aug 20 '20 07:08 lhoupert

I have the same problem using @yalin solution as well. Screen Shot 2020-08-27 at 3 00 58 PM

Hope this will get fix soon

duongnosu avatar Aug 27 '20 22:08 duongnosu

bump

padenalex avatar Oct 13 '20 02:10 padenalex

I have the same issue on Linux Mint 20 using Atom 1.51.0 and jupyter-notebook package version 0.0.10, first the error and after trying @yalin fix the issue with wrong displaying.

madSec avatar Oct 16 '20 21:10 madSec

As I see everyone has the same problem :) The project README file has a section at the top

This project does not have any active maintainers. We recommend that you use nteract, a native notebook application built using Electron, React (like this project), Redux, and RxJS, or Hydrogen, a LightTable-inspired package for Atom that allows users to run code blocks and selections using Jupyter kernels.

The bracket solution that I wrote above is for a temporary solution and also for an open-source fix. It's not an official solution. Owners of this project should fix the main issue but as I see, the project is deprecated. The best thing to do is; either you fix the issue of this open-source project on your own, or use the new applications which the owners recommend.

cheers! :rocket: and stay safe :mask:

yalin avatar Oct 19 '20 12:10 yalin

image

3xploiton3 avatar Jan 21 '21 12:01 3xploiton3

As I see everyone has the same problem :) The project README file has a section at the top

This project does not have any active maintainers. We recommend that you use nteract, a native notebook application built using Electron, React (like this project), Redux, and RxJS, or Hydrogen, a LightTable-inspired package for Atom that allows users to run code blocks and selections using Jupyter kernels.

The bracket solution that I wrote above is for a temporary solution and also for an open-source fix. It's not an official solution. Owners of this project should fix the main issue but as I see, the project is deprecated. The best thing to do is; either you fix the issue of this open-source project on your own, or use the new applications which the owners recommend.

cheers! 🚀 and stay safe 😷

Hi. The owner of @atom-community here. I am interested in providing the functionality of opening ipynb files (which is I think the only missing feature) inside Hydrogen.

If @jupyter is interested, I can become a member of @jupyter and take care of the maintenance. They can also transfer it to @atom-community as another alternative.

cc: @gnestor

aminya avatar Jan 21 '21 12:01 aminya

Hi, have there been any updates on this issue?

rkansal47 avatar Sep 17 '21 18:09 rkansal47

I'm not maintaining this repo any more and I don't think anyone else is, either. The Jupyter integration with VS Code is a good option these days.

gnestor avatar Sep 18 '21 17:09 gnestor