错误!安装时 next.js

npm ERR! while installing next.js

我有一个问题,比如当我尝试使用 npm install --save next 安装 next.js 然后显示下面的错误

npm ERR! Unexpected end of JSON input while parsing near '...:{"eslint":"3.19.0","'

过去几个小时我就一直在研究它。 我该如何解决?

package.json

{
  "name": "a-client-project",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "dev": "node server.js -p $PORT",
    "build": "next build",
    "start": "NODE_ENV=production node server.js -p $PORT"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "body-parser": "^1.19.0",
    "express": "^4.17.1",
    "react": "^16.9.0",
    "react-dom": "^16.9.0"
  }
}

信息:

OS: Windows 10
NodeJS: 10.16.3
NPM: 6.11.3

谢谢

问题是由于节点缓存。

npm cache clean --force

已解决问题。

在这里写下答案以防其他人遇到这个问题。 :)