在使用JHipster创建的Spring Boot应用程序中使用npm安装时发生错误

问题描述 投票:0回答:1

我已经生成了一个新的Spring Boot + Angular JHipster应用程序,并且在“ npm install”时出现错误

npm ERR! Unexpected end of JSON input while parsing near '...12-75IgJJaF8pSxZxcG8v'
npm ERR! A complete log of this run can be found in:

下面的文字来自日志文件

3614 verbose stack SyntaxError: Unexpected end of JSON input while parsing near '...12-75IgJJaF8pSxZxcG8v'
3614 verbose stack     at JSON.parse (<anonymous>)
3614 verbose stack     at parseJson (D:\Installed\WebDevelopment\npm-global\node_modules\npm\node_modules\json-parse-better-errors\index.js:7:17)
3614 verbose stack     at consumeBody.call.then.buffer (D:\Installed\WebDevelopment\npm-global\node_modules\npm\node_modules\node-fetch-npm\src\body.js:96:50)
3614 verbose stack     at process.internalTickCallback (internal/process/next_tick.js:77:7)
3615 verbose cwd D:\Projects\EclipseWorkspace\JavaEE-STS\ProblemStackWorkspace\ProblemStack
3616 verbose Windows_NT 10.0.19041
3617 verbose argv "D:\\Installed\\WebDevelopment\\nodejs\\node.exe" "D:\\Installed\\WebDevelopment\\npm-global\\node_modules\\npm\\bin\\npm-cli.js" "install"
3618 verbose node v11.2.0
3619 verbose npm  v6.14.4
3620 error Unexpected end of JSON input while parsing near '...12-75IgJJaF8pSxZxcG8v'

关于可能导致它以及如何解决的任何想法

angular spring-boot web-applications jhipster npm-install
1个回答
0
投票

由于@GaëlMarziou的评​​论,此错误在以下时间没有出现:

安装LTS版本的节点并运行npm cache clean --force

© www.soinside.com 2019 - 2024. All rights reserved.