npm install @nestjs/config使用NPM ERR失败!解析时JSON输入的意外结束

发布于 2025-01-30 06:08:07 字数 515 浏览 4 评论 0原文

我尝试使用文档使用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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

所有深爱都是秘密 2025-02-06 06:08:07

我搜索了此行为,但找不到任何特定错误。

然后,我决定尝试 @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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文