ปัญหาที่เจอ
เมื่อ run . npm install ใน project ที่กำลังพัฒนา
แล้วเจอปัญหาแบบนี้ Unexpected end of JSON input while parsing near

การแก้ไขนั้นมีเพียบเลยจึงสรุปไว้หน่อย
ซึ่งเป็นปัยหามาจาก cached ของ npm เอง

  1. ลบไฟล์ package-lock.json และ run npm cache clear –force
  2. ทำการลบ npm cached ตรง ๆ ที่ ~/.npm บน Linux/Mac หรือ %AppData%/npm-cache บน Windows
Tags: