404: '@angular/src' is not in the npm registry?

338 views
Skip to first unread message

random512

unread,
Jul 22, 2016, 2:29:08 PM7/22/16
to AngularJS
I'm getting several 404 errors displayed my chrome devtools Console when I try to run my .NET website with Angular 2. Most of the console errors seem to have the following root cause: 

Not found: package "@angular/src"

Here's 1 url returned in the console that returns the error:


I did a text search in my app and no results are returned for "common_directives" so I'm guessing that this is reference is probably made as a dependency from some other reference. Have you seen this error before?  Any idea how to debug?

I tried:

npm i @angular/src --save

However this returns the following error:

'@angular/src' is not in the npm registry

Lucas Lacroix

unread,
Jul 22, 2016, 2:32:41 PM7/22/16
to ang...@googlegroups.com
That is not an angular module that I am aware of. If you've followed the Angular2 tutorial, you should have these dependencies in your package.json:
@angular/common
@angular/compiler
@angular/core
@angular/forms
@angular/http
@angular/platform-browser
@angular/platform-browser-dynamic

Everything you need for the typical Angular2 application should be in one of those modules.

--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.



--
Lucas Lacroix
Computer Scientist
System Technology Division, MEDITECH

Randy Gamage

unread,
Jul 25, 2016, 1:44:28 PM7/25/16
to AngularJS
I have noticed some Visual Studio example projects reference the Angular2 dependency like this instead:

     "angular2": "2.0.0-beta.17"


Is this one-line reference equivalent to the references below?  If so, what is the relationship between the version above (2.0 beta-17) and the versions of each of the components (like 2.0 rc4)?


Thanks,

Randy

Lucas Lacroix

unread,
Jul 25, 2016, 1:58:48 PM7/25/16
to ang...@googlegroups.com
That is the beta and is before angular2 was modularized. If you're using one of the RCs (hopefully, the latest), then you need to pull in each module as needed.
Reply all
Reply to author
Forward
0 new messages