npm install #nestjs/config fails with npm ERR! Unexpected end of JSON input while parsing - nestjs-config

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.

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.

Related

Why would my app code show "Could not find a declaration file for module ... " when the library has an index.d.ts file?

This is the library that's causing the problem: simple-social-signin.
To my understanding, the library doesn't need to have a declare module statement. What might be wrong?
To reproduce the bug:
Install the library
Import:
import { getGoogleUserInfo, getFacebookUserInfo } from 'simple-social-signin';
Also, not sure if that would help, but when I was publishing this package I got this weird error, even though the package was still published and I got the "successfully published" email
npm ERR! code E403
npm ERR! 403 403 Forbidden - PUT https://registry.npmjs.org/simple-social-signin - You cannot publish over the previously published versions: 1.0.9.
npm ERR! 403 In most cases, you or one of your dependencies are requesting
npm ERR! 403 a package version that is forbidden by your security policy.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/omar/.npm/_logs/2020-05-18T20_47_59_780Z-debug.log
I checked the logs and they don't have anything meaningful.
I had to restart VScode for that error to disappear. Closing the tab didn't fix it. Weird...

Is there a way to solve json file parsing errors while installing a npm package?

I was trying to install the angular cli and create-react-app with npm in the node.js command prompt but I get this error both times : "npm ERR! Unexpected end of JSON input while parsing near '..."rx":"^2.3.25","serve'"
I've tried to re-install node.js and update npm to the last version, hoping it will fix the file but i still have the error
So do you have any idea about how to fix this and to be able to install what I need correctly ?

Npm with No error Message

i am trying to install packages using npm (including CLI,) but after some point the npm is not responding as such.It is neither showing an error logs nor any error messages. The moment i enter some package that needs to be installed it's not responding.It goes to the next line without any error message.Can anyone please help me out.Thank you.

How install extension for Node in Windows Server 2012?

I installed the WebMatrix and NPM for node. But NPM does not work shows an error:
An error occurred.
Failed: npm reported an error.
NodeNpm.NpmException: Failed: npm reported an error. at
NodeNpm.NpmApi.Search(String searchTerms) at
Microsoft.WebMatrix.NpmGallery.CachingPackageManger.FetchRemotePackages()
at System.Threading.Tasks.Task`1.InnerInvoke() at
System.Threading.Tasks.Task.Execute()
How I can install node extension?
It looks like WebMatrix is trying to use npm search. This is known to be flaky, so it may take several retries for the search data to be fully downloaded and the index built.

The ionic start command fails for me with the following error on Ubuntu 14.04

The ionic start command fails for me with the following error on Ubuntu 14.04 and need assistance in resolving the issue:
andrew#FinancialIndepence:~/WebstormProjects/stadiumStore/mobile$ ionic start myApp tabs
Creating Ionic app in folder /home/andrew/WebstormProjects/stadiumStore/mobile/myApp based on tabs project
Downloading: https://github.com/driftyco/ionic-app-base/archive/master.zip
[=============================] 100% 0.0s
Downloading: https://github.com/driftyco/ionic-starter-tabs/archive/master.zip
[=============================] 100% 0.0s
Update config.xml
Initializing cordova project
Fetching plugin "org.apache.cordova.device" via plugin registry
npm ERR! registry error parsing json
npm ERR! registry error parsing json
npm ERR! registry error parsing json
SyntaxError: Unexpected token I
Internal routing error
Sorry, we cannot connect to the intended server.
We have just been notified of this problem. We will correct it as soon as possible.
Feel free to contact us if you have any questions: support#iriscouch.com
at Object.parse (native)
at RegClient.<anonymous> (/home/andrew/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:274:23)
at /home/andrew/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:251:7
at Gunzip.onEnd (zlib.js:167:5)
at Gunzip.emit (events.js:117:20)
at _stream_readable.js:944:16
at process._tickCallback (node.js:442:13)
Unable to add plugins. Perhaps your version of Cordova is too old. Try updating (npm install -g cordova), removing this project folder, and trying again. (CLI v1.3.0)
Thanks in advance!
In the forums several people were saying that the plugins.cordova.io server was down. Others say that trying a different version worked for them.
http://forum.ionicframework.com/t/ionic-start-cli-errors/15468/4
I just ran the same command and had no trouble with it

Resources