Quantcast
Viewing all articles
Browse latest Browse all 2047

NPM :: แก้ไขปัญหา Unexpected end of JSON input while parsing near

Image may be NSFW.
Clik here to view.

Image may be NSFW.
Clik here to view.

ปัญหาที่เจอ
เมื่อ 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

Viewing all articles
Browse latest Browse all 2047

Trending Articles