IN VS2017 I have a quick node.js "Hello world" project. The installed template for node.js includes using NPM via an included package.json
I am editing the package.json file to include new dependencies. Upon saving package.json
VS is supposed to install any new packages that are included.
I started with the project template: Other Languages\TypeScript\Node.js
I confirmed that the option is enabled for Restoring npm packages on save of package.json
But no matter what changes I make to package.json VS won't run npm and install the missing packages. Also if I build or run VS won't automatically install the missing packages. I can right click on npm and select Install Missing Packages which does work.
What am I missing?
Restore on Save for NPM packages currently doesn't work in NPM projects. I'm still tracking down the root issue, but I did come across a discussion where they (the NTVS folks) wanted to opt out of some behaviors for Web projects.
There are some context menu options on the npm
or individual package nodes to restore/update/etc. You could also create new keyboard shortcuts for these context menu items, but I don't know of a way to make Ctrl+S work.
I'm following up internally to revisit these decisions, but in the meantime, send in feedback so that we have some customer data to point to!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With