so I'm trying to run a basic npm install in NuGet and when I ran 'npm init' it hangs right after getting this far:
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.
See `npm help json` for definitive documentation on these fields
and exactly what they do.
Use `npm install <pkg>` afterwards to install a package and
save it as a dependency in the package.json file.
Press ^C at any time to quit.
at this point it will not respond to any commands, and ^C does not do anything.
I have tried reinstalling npm, updating npm, closing and reopening Visual Studio 2019, no dice. All the help I can find says that this was an issue a couple years ago, but that the fix was either to revert a recent npm update or just wait for a new version to be released so I'm not sure why I'm seeing it in 2020.
I was able to get my package.json installed using 'npm init -y' so i don't think this is hurting my project but i would still like to make sure there isn't anything totally wrong with my setup
Package Manager Console hangs on npm init
The issue is not solved until now
In fact, this is a known issue with the NuGet Package Manager Console itself.
Its primary function is to manage (install/change/uninstall/etc.
) NuGet packages for you project and it's meant to run PowerShell commands. And it is just a partial integration so it doesn't work as perfectly for an external npm tool as a full Powershell.
l have reported this thread to DC Forum to reflect this problem to the relevant staff. here is the link. Anyone who meets the same issue will vote it here and you can also add any detailed comment in the link which will raise great attention from Microsoft.
Since the process may take much time and as a workaround, you can try my suggestion:
1) Use the external Powershell rather than Nuget Package Console
by menu Tools
-->Command Line
-->Developer PowerShell
.
Hope it could help you.