Closed pankajparkar closed 7 years ago
Please run the following command, and reply with the version numbers that you see:
node -v && npm -v
I'm unable to reproduce on my machine, and I'm using Node 6.9.1 and npm 4.0.5 with VS 2015 Update 3.
One setting to check in VS 2015 is Tools --> Options --> Projects and Solutions --> External Web Tools. Make sure that the $(PATH) entry is the 2nd one in the list of 4.
That got worked. Thanks @scottaddie
Could you please tell me, why npm download all unnecessary packages in my node_modules
folder?
I expected it to show only mentioned packages inside package.json
.
Any thoughts?
As of npm v3, there's no longer a 1-to-1 mapping between dependencies
/devDepdendencies
in package.json
and folders in node_modules
. Specifically, this version of npm flattens dependencies as they're installed. This feature is intended to save Windows users from the MAX_PATH character limitation that was encountered in npm v2.
Take, for example, the following package.json
file:
{
"version": "1.0.0",
"name": "asp.net",
"private": true,
"dependencies": {
"@angular/common": "^2.4.1",
"@angular/compiler": "~2.4.1",
"@angular/core": "~2.4.1",
"@angular/forms": "~2.4.1"
},
"devDependencies": {
"webpack": "1.14.0"
}
}
You'll see the following contents in node_modules
after running npm install
:
With the exception of node_modules/@angular
, the other folders are required for Webpack.
@scottaddie Thanks for clarification :+1: , It has cleared my concept.
It seems to be a bug.
Installed product versions
Description
I'm trying to install angular 2 packages using NPM Task Runner.
angular
package has@angular/common
,@angular/core
,@angular/upgrade
,@angular/forms
.etc. When I tried to install the packages usingRestore Package
option.It throws an error below error
If you look at output closely, what I observed is while running npm commands it removes
@
(symbol) from package name. That's the reason package doesn't get install.Steps to recreate
dependencies
optionpackage.json
and run a build from "Task Runner Explorer"(also tried restore package option)Expected behavior
It should download
@angular/common
package, I mean package with@
symbol.