npm install @nestjs/config使用NPM ERR失败!解析时JSON输入的意外结束
我尝试使用文档使用npm install @nestjs/config
来安装NPM 并且安装过程失败了。
我收到了一个错误消息:
npm ERR! Unexpected end of JSON input while parsing near '....0","lodash.get":"4.4'
在链接的日志文件中,错误消息指向我发现这些行很相关:
http fetch GET 200 https://registry.npmjs.org/@nestjs%2fconfig 16ms (from cache)
silly fetchPackageMetaData error for @nestjs/config@latest Unexpected end of JSON input while parsing near '....0","lodash.get":"4.4'
我尝试在新的Nestjs项目上安装,并得到相同的错误结果。
I tried installing npm as described by the documentation using npm install @nestjs/config
and the installation process failed.
I got an error message:
npm ERR! Unexpected end of JSON input while parsing near '....0","lodash.get":"4.4'
and in the linked log file that the error message pointed to I found these lines as relevant:
http fetch GET 200 https://registry.npmjs.org/@nestjs%2fconfig 16ms (from cache)
silly fetchPackageMetaData error for @nestjs/config@latest Unexpected end of JSON input while parsing near '....0","lodash.get":"4.4'
I tried installing on a new nestjs project and got same error results.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我搜索了此行为,但找不到任何特定错误。
然后,我决定尝试 @nestjs/config的特定版本。
我转到了Nestjs/config的发行页: link> link ... 并选择了版本2.0。 0。
然后,我使用cli命令安装该特定版本:
npm install @nestjs/ [电子邮件 受保护]
,它起作用。因此,此刻的默认版本必须存在一些问题,直到Nestjs团队修复它,解决方案将是安装特定版本。
I searched the web for this behavior but couldn't find anything for this specific error.
I then decided to try a specific release of @nestjs/config.
I went to the release page of nestjs/config: Link... and picked release 2.0.0.
Then I used the cli command to install that specific release :
npm install @nestjs/[email protected]
and it worked.So there must be some problem with the default release at this moment and until the nestjs team fix it the solution will be to install a specific release.