1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

[Hydrogen] WindowsでAtom + Hydrogenを使おうとして、エラーになった話

Posted at

前提

  • Windows
  • Atom インストール済み
  • Hydrogen インストール済み
  • Node.js インストール済み

エラー内容

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

解決してしまったので検索履歴あさりました。。。たしかこんなかんじ。。。

解決方法

はじめに

npm install --save @nteract/presentational-components

からの

npm install react@16.3.2

これらはインストール済みならやらなくてもよいです。

次に

Atomエディタを開き、 設定 - > Packages -> Hydrogen -> View Code (多分上の方にある)でHydrogenのコードを開きます。

そして、.atom/packages/Hydrogen/package.jsonのコード中にある、

dependencies

の欄に、(多分アルファベット順に並んでる)

@nteract/presentational-components":"^3.0.6

を書き込みます。
3.0.6はバージョンで、以下のコマンドで確認できます。

npm info @nteract/presentational-components

そして、コマンドプロンプトで先ほど編集したpackage.jsonがある場所へ行きます。
(例)

cd C:/Users/[Username]/.atom/packages/Hydrogen

その後、以下のコマンドを実行します。

apm install

以上で準備は終わりです。

最後に

動作確認してみましょう。

hello.py
# %% One line outputs
print("Hello !")

print("Hello !")の行にカーソルを持っていき、Ctrl + Enterで実行されれば成功です。

まとめ

WindowsでAtom + Hydrogen を使おうとして、エラーになった話でした。
調べると、Hydrogenの設定のkernel Specにコードを貼るとか、Startup Codeにコードを貼るとかいうのがいっぱい出てきたけど、そんな欄は無いので困りました。。。
GitHubにIssuesで二日前に解決されていてよかったです。英語できたらこういうところで解決してもらえそうですね。英語もがんばろ。
https://github.com/nteract/hydrogen/issues/1768

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?