All Articles

sharpがインストールできない

gatsbyのテーマを変えたくていろいろ試していたんだけど、急に npm run develop ができなくなったので、その解決エントリ。 結局nodeのバージョンが 12系だとうまく行かなかったので、10系に落とすことにした。

nvmのインストールしたのでそれだけメモする

nvmのインストール

# ちゃんとオフィシャルに行ってバージョンは確認してね
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
# インストール時に出てきたuninstallコマンドを実施

├── gatsby-cli@2.7.49
├── install@0.13.0

=> If you wish to uninstall them at a later point (or re-install them under your
=> `nvm` Nodes), you can remove them from the system Node as follows:

     $ nvm use system
     $ npm uninstall -g a_module

=> Close and reopen your terminal to start using nvm or run the following to use it now:

export NVM_DIR="$HOME/.config"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

# こんな感じで出てきたのでそのとおりにuninstallして.zshrc に追加
# ターミナル再起動
# ls-remoteでほしいバージョンを探す
nvm ls-remote
nvm install <お好きなバージョン>
nvm use <お好きなバージョン>

今回は nvm use 10.16.3 を使うようにしたら解決。