0

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.

Yariv
  • 1,212
  • 10
  • 21

1 Answers1

0

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/config@2.0.0 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.

Yariv
  • 1,212
  • 10
  • 21