Trying to work with the latest RC of angualr 2 (2.0.0-rc.1) and NPM is unable to download the following dependency "@angular/compiler": "2.0.0-rc.1", with NPM showing a 404 error.
npm http 404 https://registry.npmjs.org/angular/compiler
npm ERR! 404 Not Found
Looks similar to the following question but I'm using the new @scope as specified in the tutorial. My full package.json is given below.
{
"dependencies": {
"@angular/common": "2.0.0-rc.1",
"@angular/compiler": "2.0.0-rc.1",
"@angular/core": "2.0.0-rc.1",
"@angular/http": "2.0.0-rc.1",
"@angular/platform-browser": "2.0.0-rc.1",
"@angular/platform-browser-dynamic": "2.0.0-rc.1",
"@angular/router": "2.0.0-rc.1",
"@angular/router-deprecated": "2.0.0-rc.1",
"@angular/upgrade": "2.0.0-rc.1",
"reflect-metadata": "0.1.3",
"rxjs": "5.0.0-beta.6",
"zone.js": "0.6.12",
"angular2-in-memory-web-api": "0.0.7",
"bootstrap": "^3.3.6"
},
"devDependencies": {
"concurrently": "^2.0.0",
"lite-server": "^2.2.0"
}
}
If you're using visual studio's inbuilt npm, you can still upgrade it, see http://jameschambers.com/2015/09/upgrading-npm-in-visual-studio-2015/
I used the approach in that article of updating the external tools paths to reference a newly installed npm.
This seems to address the issue in the OP, and worked for me. So as far as I can tell, the solution in the linked article works.
Just to add, it may be necessary to clean the node_modules folder and then resave package.json - I did that and got a successful npm install from within visual studio.
The solution for this issue can be upgrading the version of Node and NPM as described here (problem exists with NPM/Node versions - anything above node v5.10.1 and npm v3.8.6+ seem to be fine).
angular2 npm http 404 with all rc1 packages
https://github.com/angular/angular/issues/8473
However my problem appears to stem from using the Visual Studio integration with NPM. By dropping down to the command line and running 'npm install' manually my problem went away. I'm guessing is has something to do with the new module '@' syntax.
Failing that it is worth checking your proxy settings and configuring NPM to work with them.
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