regepanのはてなブログ

個人的なメモ帳レベルの文章。

npm ERR! invalid json response body at https://registry.npmjs.org/@babel%2ftraverse reason: Unexpected end of JSON input

  • Ubuntu 20.04.4 LTS
  • nodejs v16.16.0
  • npm 8.17.0
  • Laravel Framework 8.83.23

意味不明なエラー...

npm install && npm run dev
npm ERR! code FETCH_ERROR
npm ERR! errno FETCH_ERROR
npm ERR! invalid json response body at https://registry.npmjs.org/@babel%2ftraverse reason: Unexpected end of JSON input

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/vagrant/.npm/_logs/2022-08-14T03_46_09_047Z-debug-0.log

キャッシュの問題だった模様

npm cache clean --force
npm WARN using --force Recommended protections disabled.

出来た

npm install && npm run dev

added 760 packages, and audited 761 packages in 1m

79 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

> dev
> npm run development


> development
> mix

 	Additional dependencies must be installed. This will only take a moment.
 
 	Running: npm install resolve-url-loader@^5.0.0 --save-dev --legacy-peer-deps
 
 	Finished. Please run Mix again.