2
0

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 3 years have passed since last update.

Unexpected end of JSON input while parsing near

Posted at

概要

npm installで詰まった。

エラー内容は、

npm ERR! Unexpected end of JSON input while parsing near

解決

npmのキャッシュとwifi環境(ネット回線の速度)が原因のようでした。
サイトを調べるとどのサイトも

npm cache clean --force

で解決とありましたが、解決できず。。

npm cache verify --force
rm -rf ~/.npm

もダメで。

結論としては
npm cache clean --forceに加えて、
速度の早いネットワーク回線に繋ぎかえたら正常に動きました。
どうやら速度制限下だとダメだったようです。

いつか誰かの参考になれば幸いです。

補足

npm キャッシュとは
https://docs.npmjs.com/cli/v6/commands/npm-cache

2
0
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
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?