Hydrogen: Missing @nteract/presentational-components on fresh install

Created on 10 Sep 2019  路  23Comments  路  Source: nteract/hydrogen

Description

Hydrogen fails after installation due to missing node package @nteract/presentational-components

Steps to Reproduce

  1. rm -rf ~/.atom
  2. atom
  3. install hydrogen (2.12.0)
  4. try to start a kernel

Versions

Hydrogen version: 2.12.0

Expected behavior

Expected to start Hydrogen.

Workaround:

add "@nteract/presentational-components":"^3.0.6", to .atom/packages/Hydrogen/package.json in the dependencies section and run cd .atom/packages/Hydrogen && apm install

bug install

Most helpful comment

I just found another workaround installing the module myself through npm:
npm install --save @nteract/presentational-components
and then
npm install [email protected] (cause I didn't have it)

Is it alright or it can cause some problems doing it this way?


Edit from @wadethestealth: I don't recommend this solution to users, but rather the solution in the first post. Reason being is it can cause complications for people unfamiliar with npm.

All 23 comments

I just found another workaround installing the module myself through npm:
npm install --save @nteract/presentational-components
and then
npm install [email protected] (cause I didn't have it)

Is it alright or it can cause some problems doing it this way?


Edit from @wadethestealth: I don't recommend this solution to users, but rather the solution in the first post. Reason being is it can cause complications for people unfamiliar with npm.

Most installation methods of @nteract/presentational-components and its dependencies should be fine.
@atteggiani

I just found another workaround installing the module myself through npm:
npm install --save @nteract/presentational-components
and then
npm install [email protected] (cause I didn't have it)

Is it alright or it can cause some problems doing it this way?

I have tried these but now I have this error: mobx-react-lite requires react with hooks support

What can I do? Since the 2.12 update hydrogen doesn't work anymore on my MacOS :/

@rastafrange I would undo whatever you have done, then do a fresh install and use the op solution not the second as it can lead to confusing results without knowledge of npm and how it works.

@wadethestealth Ok thanks. If I sum up I uninstall Hydrogen and reinstall it? what is the "op solution"? thanks

@rastafrange

Workaround:

add "@nteract/presentational-components":"^3.0.6", to .atom/packages/Hydrogen/package.json in the dependencies section and run cd .atom/packages/Hydrogen && apm install

You should see other similar entries of other nteract libraries under the dependencies section of package.json

Thank you it worked!

Ran the npm install --save @nteract/presentational-components command in .atom/packages/Hydrogen and the issue was resolved.

Thanks @atteggiani !

Make sure you put "@nteract/presentational-components": "^3.0.6", in the dependencies section. Also running apm install gave my errors with husky but still seemed to fix issue.

Ran the npm install --save @nteract/presentational-components command in .atom/packages/Hydrogen and the issue was resolved.

Thanks @atteggiani !

Cool! Worked for me either! Thanks!

How do I add this?
I opened the file on notepad and there are many code blocks. Didn't want to mess anything up.
Newbie here.

There is a section titled dependencies, you should see lines very similar to what you need to add @kettlecorner

There is a section titled dependencies, you should see lines very similar to what you need to add @kettlecorner

Thank you!
Ran apm install on conda prompt in the Hydrogen folder and opening atom doesn't throw an error anymore!

Hi, i have added "@nteract/presentational-components":"^3.0.6" to the code, but when i run the cd&apm install command, terminal gives me the following error:
Screen Shot 2019-09-17 at 11 15 54 AM

@yinzhema This seems to be a completely unrelated issue. Can you please open a new issue explaining what steps you took to install hydrogen along with your versions?

I have opened a new issue here. Thanks!
https://github.com/nteract/hydrogen/issues/1774

This should be officially fixed by now. If you see this issue, please upgrade @nteract/markdown from version 4.0.0 to something greater.

@wadethestealth, In atom I don't use @nteract/markdown and not one package is showing to be in need of an upgrade. I manually forced a check. I tried to bring up a list of nteract packages https://atom.io/users/nteract and only hydrogen is listed. When you say "upgrade" do you mean a npm cmd like npm install @nteract/markdown or something else? It seems you advised against using the npm workaround a few days ago, so I must be off track. Could you explain for the uninitiated? Thanks

If you install hydrogen again you should not have this error, but I am referring to the npm package as our dependency so instead of using presentational-components in the work around use markdown and version greater than 4

Uninstall + install hydrogen from atom pref did it. Thanks

I've been having many issues getting hydrogen working again and none of the myriad workarounds have fixed my problem. I had this issue on Ubuntu 19.04 and 19.10. I've done, among several other things, the following tasks in many permutations: reinstalling atom, (re)installing hydrogen using the atom GUI, (re)installing hydrogen via apm, (re)installing hydrogen directly from the .atom/packages/Hydrogen directory, adding the presentational-components line (as done above) to the package.json file, manually downgrading Hydrogen to 2.12 and 2.11, attempting the various fixes associated with getting apm/npm to find python2 (rather than python3), including modifying python-interceptor.sh and updating my apm config to use python2.7 explicitly.

The current status of the problem on my end is that I can get Hydrogen to install, but attempting to start a kernel gives me the stack trace given below.

Atom: 1.41.0 x64
Electron: 4.2.7
OS: Ubuntu 19.10
Thrown From: Hydrogen package 2.13.1

Stack Trace

Failed to activate the Hydrogen package

At Unexpected token export

/home/sseyler/.atom/packages/Hydrogen/node_modules/react-syntax-highlighter/dist/esm/styles/prism/vs.js:1
(function (exports, require, module, __filename, __dirname, process, global, Buffer) { return function (exports, require, module, __filename, __dirname) { export default {
                                                                                                                                                           ^^^^^^

SyntaxError: Unexpected token export
    at new Script (vm.js:79:7)
    at NativeCompileCache.runInThisContext (/usr/share/atom/resources/app/static/<embedded>:11:146322)
    at Module.get_Module._compile (/usr/share/atom/resources/app/static/<embedded>:11:147206)
    at Object.value [as .js] (/usr/share/atom/resources/app/static/<embedded>:11:150977)
    at Module.load (internal/modules/cjs/loader.js:602:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
    at Function.Module._load (internal/modules/cjs/loader.js:533:3)
    at Module.require (/app.asar/static/index.js:72:46)
    at require (/usr/share/atom/resources/app/static/<embedded>:11:146745)
    at /packages/Hydrogen/node_modules/@nteract/presentational-components/lib/syntax-highlighter/index.js:15:30)
    at /packages/Hydrogen/node_modules/@nteract/presentational-components/lib/syntax-highlighter/index.js:46:3)
    at Module.get_Module._compile (/usr/share/atom/resources/app/static/<embedded>:11:147429)
    at Object.value [as .js] (/usr/share/atom/resources/app/static/<embedded>:11:150977)
    at Module.load (internal/modules/cjs/loader.js:602:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
    at Function.Module._load (internal/modules/cjs/loader.js:533:3)
    at Module.require (/app.asar/static/index.js:72:46)
    at require (/usr/share/atom/resources/app/static/<embedded>:11:146745)
    at /packages/Hydrogen/node_modules/@nteract/presentational-components/lib/components/source.js:15:46)
    at /packages/Hydrogen/node_modules/@nteract/presentational-components/lib/components/source.js:51:3)
    at Module.get_Module._compile (/usr/share/atom/resources/app/static/<embedded>:11:147429)
    at Object.value [as .js] (/usr/share/atom/resources/app/static/<embedded>:11:150977)
    at Module.load (internal/modules/cjs/loader.js:602:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
    at Function.Module._load (internal/modules/cjs/loader.js:533:3)
    at Module.require (/app.asar/static/index.js:72:46)
    at require (/usr/share/atom/resources/app/static/<embedded>:11:146745)
    at /packages/Hydrogen/node_modules/@nteract/presentational-components/lib/components/input.js:16:18)
    at /packages/Hydrogen/node_modules/@nteract/presentational-components/lib/components/input.js:52:3)
    at Module.get_Module._compile (/usr/share/atom/resources/app/static/<embedded>:11:147429)
    at Object.value [as .js] (/usr/share/atom/resources/app/static/<embedded>:11:150977)
    at Module.load (internal/modules/cjs/loader.js:602:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
    at Function.Module._load (internal/modules/cjs/loader.js:533:3)
    at Module.require (/app.asar/static/index.js:72:46)
    at require (/usr/share/atom/resources/app/static/<embedded>:11:146745)
    at /packages/Hydrogen/node_modules/@nteract/presentational-components/lib/index.js:10:17)
    at /packages/Hydrogen/node_modules/@nteract/presentational-components/lib/index.js:23:3)
    at Module.get_Module._compile (/usr/share/atom/resources/app/static/<embedded>:11:147429)
    at Object.value [as .js] (/usr/share/atom/resources/app/static/<embedded>:11:150977)
    at Module.load (internal/modules/cjs/loader.js:602:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:541:12)

Commands

     -0:02.5.0 hydrogen:run-cell-and-move-down (input.hidden-input)

Non-Core Packages

atom-beautify 0.33.4 
atom-ide-ui 0.13.0 
atom-monokai 0.10.9 
atom-notes 1.20.0 
autocomplete 0.47.0 
autocomplete-python 1.16.0 
busy-signal 2.0.1 
character-table 0.4.3 
code-annotations 3.3.1 
custom-folds 1.9.5 
hard-wrap 1.7.1 
hey-pane 1.2.0 
Hydrogen 2.13.1 
hydrogen-cell-separator 0.4.1 
hydrogen-launcher 1.2.2 
hydrogen-python 0.0.8 
ide-fortran 0.4.0 
ide-python 1.5.0 
intentions 1.1.5 
kite 0.174.0 
language-csv 1.1.2 
language-cython 0.3.0 
language-fortran 2.1.9 
language-lammps 3.1.0 
language-latex 1.2.0 
language-lua 0.9.11 
language-markdown 0.37.0 
language-restructuredtext 1.1.2 
latex 0.50.2 
latex-autocomplete 1.1.1 
latex-completions 0.3.6 
latex-wordcount 0.6.0 
linter 2.3.1 
linter-annotations 1.0.4 
linter-spell 0.15.0 
linter-spell-latex 0.11.0 
linter-ui-default 1.8.0 
MagicPython 1.1.1 
markdown-pdf 2.2.0 
markdown-writer 2.11.9 
monokai-dark 1.5.0 
monokai-seti 0.9.0 
open-on-bitbucket 0.5.0 
platformio-ide-terminal 2.10.0 
python-tools 0.6.9 
set-syntax 0.4.0 
seti-icons 1.5.4 
seti-syntax 1.2.0 
seti-ui 1.11.0 
special-symbols 0.1.0 
split-diff 1.6.1 
sync-settings 0.8.6 
tablr 1.8.3 
videoplayer 1.5.1 
vim-mode-plus 1.36.2 
wordcount 3.1.0 

@sseyler the issue you are seeing now is #1804, which ironically is another unchecked pr for this package. Sorry for your troubles once #1804 is solved though you will likely be able to use hydrogen with no further issues.

I have the error shown below which links to this issue but it has not helped to reinstall Hydrogen nor do the 'workaround'. However, in the dependencies section of .atom/packages/Hydrogen/package.json I see that @nteract/markdown is version 4.0.0 which seems to cause the error? How do I (manually) update this? Preferably without using npm as I'm unfamiliar with it.

The issue is caused by either upgrading all Conda packages or trying to downgrade Python to version 3.6.8 for compatibility with ArcPy (Conda failed to solve the conflicts with incompatible packages, so I created a new environment instead). However, the issue persists even after a complete reinstallation of Atom and likewise of Anaconda including deleting the folders .atom, .conda, and all folders related to these programs or packages within AppData\Local\ and AppData\Roaming\.

Complete error message:

Failed to activate the Hydrogen package

Invalid or unexpected token

C:\Users\jwz766\.atom\packages\Hydrogen\node_modules\github-markdown-css\github-markdown.css:1

SyntaxError: Invalid or unexpected token
    at new Script (vm.js:79:7)
    at NativeCompileCache.runInThisContext (C:\Users\jwz766\AppData\Local\atom\app-1.43.0\resources\app\static\<embedded>:11:146322)
    at Module.get_Module._compile (C:\Users\jwz766\AppData\Local\atom\app-1.43.0\resources\app\static\<embedded>:11:147206)
    at Object.value [as .js] (C:\Users\jwz766\AppData\Local\atom\app-1.43.0\resources\app\static\<embedded>:11:150977)
    at Module.load (internal/modules/cjs/loader.js:602:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
    at Function.Module._load (internal/modules/cjs/loader.js:533:3)
    at Module.require (file:///C:/Users/jwz766/AppData/Local/atom/app-1.43.0/resources/app.asar/static/index.js:72:46)
    at require (C:\Users\jwz766\AppData\Local\atom\app-1.43.0\resources\app\static\<embedded>:11:146745)
    at Object.<anonymous> (C:\Users\jwz766\.atom\packages\Hydrogen\node_modules\@nteract\markdown\lib\markdown-render.js:18:1)
    at Object.<anonymous> (C:\Users\jwz766\.atom\packages\Hydrogen\node_modules\@nteract\markdown\lib\markdown-render.js:31:3)
    at Module.get_Module._compile (C:\Users\jwz766\AppData\Local\atom\app-1.43.0\resources\app\static\<embedded>:11:147429)
    at Object.value [as .js] (C:\Users\jwz766\AppData\Local\atom\app-1.43.0\resources\app\static\<embedded>:11:150977)
    at Module.load (internal/modules/cjs/loader.js:602:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
    at Function.Module._load (internal/modules/cjs/loader.js:533:3)
    at Module.require (file:///C:/Users/jwz766/AppData/Local/atom/app-1.43.0/resources/app.asar/static/index.js:72:46)
    at require (C:\Users\jwz766\AppData\Local\atom\app-1.43.0\resources\app\static\<embedded>:11:146745)
    at Object.<anonymous> (C:\Users\jwz766\.atom\packages\Hydrogen\node_modules\@nteract\markdown\lib\index.js:6:43)
    at Object.<anonymous> (C:\Users\jwz766\.atom\packages\Hydrogen\node_modules\@nteract\markdown\lib\index.js:11:3)
    at Module.get_Module._compile (C:\Users\jwz766\AppData\Local\atom\app-1.43.0\resources\app\static\<embedded>:11:147429)
    at Object.value [as .js] (C:\Users\jwz766\AppData\Local\atom\app-1.43.0\resources\app\static\<embedded>:11:150977)
    at Module.load (internal/modules/cjs/loader.js:602:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
    at Function.Module._load (internal/modules/cjs/loader.js:533:3)
    at Module.require (file:///C:/Users/jwz766/AppData/Local/atom/app-1.43.0/resources/app.asar/static/index.js:72:46)
    at require (C:\Users\jwz766\AppData\Local\atom\app-1.43.0\resources\app\static\<embedded>:11:146745)
    at Object.<anonymous> (C:\Users\jwz766\.atom\packages\Hydrogen\node_modules\@nteract\outputs\lib\components\media\markdown.js:13:36)
    at Object.<anonymous> (C:\Users\jwz766\.atom\packages\Hydrogen\node_modules\@nteract\outputs\lib\components\media\markdown.js:27:3)
    at Module.get_Module._compile (C:\Users\jwz766\AppData\Local\atom\app-1.43.0\resources\app\static\<embedded>:11:147429)
Was this page helpful?
0 / 5 - 0 ratings

Related issues

neurotronix picture neurotronix  路  4Comments

homocomputeris picture homocomputeris  路  4Comments

gepcel picture gepcel  路  3Comments

xmen1412 picture xmen1412  路  3Comments

nils-werner picture nils-werner  路  3Comments