npm ERR! Unexpected token < in JSON at position 12842

前端 未结 11 1712
借酒劲吻你
借酒劲吻你 2021-01-01 10:59

Every time I try installing any package or even if I try doing npm install I keep getting this error. I have no idea why I am getting the error. I am totally ne

11条回答
  •  -上瘾入骨i
    2021-01-01 11:40

    For me, deleting package.lock was not enough. My IDE always said this error:

    Unexpected token <

    So what I did:

    1. Removed package.lock file
    2. In IDE: npm cache verify
    3. I write in the plain command-line interpreter , NOT in IDE :

      npm install @angular/http
      

提交回复
热议问题