Do Not See when right Clicking "Manage npm modules" - node.js

I am following along with Shawn Wildermuth's Node.js for .NET Developers. I have already install NodeJS Tools for Visual Studio from nodejstools.codeplex.com.
Everything appears to have installed properly, I have just created a "NodeJS Blank Website".
However, when Shaun says to right click the NPM node in the solution and choose "Manage NPM Modules", I do not have it.
I circumvented the problem by doing an install from NodeJS command prompt directly but I sure would like to know why Visual Studio is ever changing and never consistent. I need a new & better IDE.
Help anyone?

I had same problem, and according to the Error message window, PATH in Environment Variable was not set to the location to nodejs folder. After I changed nodejs folder location to C:/Program Files/nodejs, right click and "Install new npm packages..." worked well to install Express. Hoping this would help for you too.

Related

NPM missing in visual studio 2017

I have Visual Studio 2017 and added support for Node.JS Development and ASP.Net Core. But when I go to Package Manager Console and write
npm
I am getting following error
The term 'npm' is not recognized as the name of a cmdlet
What could be a problem?
NPM should be fully integrated with VS
https://webtooling.visualstudio.com/package-managers/npm/
The default path for npm is:
C:\%ProgramFiles%\nodejs
You should have a npm.cmd there. The Windows PATH environment variable needs to point to that folder.
My advice is to reinstall nodejs from the source:
https://nodejs.org/en/download/
During Setup, making sure you choose Custom Setup and select "Add to PATH" and make sure it is set to "Will be installed on local hard drive".
(Of course, shut down all Visual Studio instances before doing the above.)

Visual Studio Installer is not installing node.js

In Visual Studio Installer, I selected the Node.js development option. It runs successfully. But, if I try to run cmd node -v. It tells me node does not exist.
I tried a few other things including uninstalling and reinstalling the Node.js development option in VS Installer. Plus installing the latest version of node from the website.
However, when I try to run the pre-packed Angular solution that comes with VS 2017 I have issues. The solution will not even start.
The best I have been able to do is install Node 6.10.3. Once I do that, the web site comes up. But, I get a JavaScript error in the vendor.js file. I am able to continue but I get this error when I try navigate to another menu item. Plus the Hot Module Replacement does not seem to be working. (It does not automatically recompile my TypeScript file if I made a change).
I think the key is getting the Node.js development option installed correctly since I am able to run the pre-packed Angular solution on another PC and the Hot Module Replacement works fine.
Please let me know if anyone has any ideas on how to resolve.
I had a similar, if not the same, issue. Check the Visual Studio installation directory (2017 Professional in this case) for Node:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\NodeJs
If the executable is there, add the directory to your PATH.

'Restore Packages' option is missing on right click in Visual Studio 2015

I am trying to start with Angular 2 and Visual Studio 2015 (Update 3) eq. with this tutorial: https://angular.io/docs/ts/latest/cookbook/visual-studio-2015.html
i need to "restore packages" on right click on 'packages.json'-file, but this option is missing in menu.
Any hints?
If you like, you can restore your packages using the npm command. This is same as doing the restore package. Hope it helps.
open up the command prompt
cd into the folder where you have your angular project
run this command : npm install
I had the same problem but restarting vs worked.
Make sure you have saved the solution while restoring packages, I saved the files and it works for me

How can I disable NPM package restore in Visual Studio 2015?

When I open a project with a package.json in Visual Studio 2015, an npm install is automatically started, and VS is unresponsive until the install is completed.
I would much rather prefer running npm install myself from the command line; how can I stop Visual Studio from doing it?
Try this:
Open Tools -> Options
Select Projects and Solutions / External Web Tools
Uncheck all four paths
Click OK
It doesn't seem that closing the solution, etc., is necessary. NPM and Bower functionality are now disabled in VS but will work fine on the command line (assuming you've globally installed npm, bower, etc.) You may get some error messages in the Output window, but no build errors or warnings.
To restore normal operation, go back to External Web Tools and click "Reset to Defaults" in the lower right.
I haven't tried this with Publish -- you might have to restore defaults to successfully publish, try it if you encounter errors at that point.
If you upgrade to Visual Studio 2017 (the free 'Community Edition' is fine) then the VS team have added an option to stop npm running when a project is opened. It's under Tools/Options/Projects and Solutions/Web Package Management/Package Restore. You can disable NPM (and Bower) restores on Project Open and on package.json Save separately.
Note also that for the node.js project types (NTVS) only the automatic package restore behavior is disabled completely in VS2017 at present.
Edit: the above answer also applies to Visual Studio 2019. The menu options are in the same place, although Bower support has been deprecated.
Visual Studio 2015 Update 2 fixed this issue! Install Update 2 and you should be good to go.
Direct download: http://go.microsoft.com/fwlink/?LinkId=691129
Update 2 Release Notes: https://www.visualstudio.com/news/releasenotes/vs2015-update2-vs
Edit: "fixed" may not be entirely accurate, and it may not be entirely fixed for all users. Maybe we can pin down what everybody's experiencing. To clarify, my experience has been as follows:
Prior to Update 2, VS would run 'npm install' every time I opened
the .sln, which was very hard to cope with.
After Update 2, VS runs 'npm install' in certain scenarios, which is tolerable (in my experience.)
In my experience, post-patch VS will, upon opening the .sln, run 'npm install' if any of the dependencies in package.json are missing from the node_modules folder (or if the folder itself is missing.)
You can't disable the 'npm install', so 'fixed' may not quite be correct - however, it doesn't do it on every launch as before, so I consider it a win. Can folks confirm this is the behavior, or are we experiencing different behaviors?

Android studio isn't starting

I have installed an Android studio from here. It worked, i wrote a hello world project and then closed it. But the IDE does not start second time. It gives me an error "caches are locked".
I installed unlocker and it says that no process blocks this folder. Does anybody know where is the problem? Thanks in advance.
I also faced this problem. I have solve my problem as follows:
Go to folder where android-studio is installed. (C:\Program Files (x86)\Android\android-studio)
Now go back to previous folder. (C:\Program Files (x86)\Android)
Right click on the android-studio folder and go to properties.
Now in Properties window, go to Security Tab.
Click the Edit Button
Now, a new window will open, here you click the Users(your-username-or-your-group-name)
Now, from the List below, Check "Allow" in front of "Full control"
Now press "OK", then again "OK"..
Its done.. Now you can use Android Studio easily instead of Running it As Administrator every time..
For details please visit this page
If you're like me, you could be trying to start a version prior to 0.2.0 (in my case 0.1.6)
Following Google's notes here: http://developer.android.com/sdk/installing/studio.html
You'll need to remove and re-install Android Studio 0.2.0 & up
"Note: There is not a patch update available from 0.1.9 to 0.2. To update from Android Studio 0.1.x to 0.2.x, you must install a new Android Studio bundle from this page. The reason for that is that we have made changes to the bundled SDK such that it includes a pre-configured local Maven repository which can serve up the v4 support library and which is required for creating new projects."
Also be aware that if you have your Android SDK files stored here:
C:\Program Files (x86)\Android\android-studio\sdk
You should move them before the uninstall or you'll need to download the SDK files again.
After the un-install and re-install now working on my Windows 7 64-bit system

Resources