angular / quickstart

Angular QuickStart - source from the documentation
MIT License
3.11k stars 3.14k forks source link

GET http://localhost:3001/node_modules/@angular/platform-browser/bundles/platform-browser.umd.js/animations 404 (Not Found) #454

Closed QingLianDuo closed 6 years ago

QingLianDuo commented 7 years ago

import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; heroes:18 Error: (SystemJS) XHR error (404 Not Found) loading http://localhost:3001/node_modules/@angular/platform-browser/bundles/platform-browser.umd.js/animations Error: XHR error (404 Not Found) loading http://localhost:3001/node_modules/@angular/platform-browser/bundles/platform-browser.umd.js/animations at XMLHttpRequest.wrapFn [as zonesymbolonreadystatechange] (http://localhost:3001/node_modules/zone.js/dist/zone.js:1230:39) [] at XMLHttpRequest.ZoneTask.invoke (http://localhost:3001/node_modules/zone.js/dist/zone.js:460:38) [] Error loading http://localhost:3001/node_modules/@angular/platform-browser/bundles/platform-browser.umd.js/animations as "@angular/platform-browser/animations" from http://localhost:3001/app/app.module.js at XMLHttpRequest.wrapFn [as zonesymbolonreadystatechange] (http://localhost:3001/node_modules/zone.js/dist/zone.js:1230:39) [] at XMLHttpRequest.ZoneTask.invoke (http://localhost:3001/node_modules/zone.js/dist/zone.js:460:38) [] Error loading http://localhost:3001/node_modules/@angular/platform-browser/bundles/platform-browser.umd.js/animations as "@angular/platform-browser/animations" from http://localhost:3001/app/app.module.js

ayyazzafar commented 7 years ago

I am also facing same issue. Why is that happening? What exactly do we need to enable this feature?

ayyazzafar commented 7 years ago

I added these three lines in systemjs.config.js:

'@angular/animations': 'npm:@angular/animations/bundles/animations.umd.js', '@angular/animations/browser': 'npm:@angular/animations/bundles/animations-browser.umd.js', '@angular/platform-browser/animations': 'npm:@angular/platform-browser/bundles/platform-browser-animations.umd.js',

https://github.com/mgechev/angular-seed/issues/1880#issuecomment-290557768

It worked for me but I have question that why did not it add these lines automatically?

cacothi commented 7 years ago

This issue is still happening with me after installign AngularMaterial, I have the following:

on the app.module.ts

import { BrowserAnimationsModule, NoopAnimationsModule } from '/animations';

imports: [ BrowserModule, MaterialModule, HttpModule, BrowserAnimationsModule, NoopAnimationsModule],

on the systemjs.config.js

'@angular/animations': 'npm:@angular/animations/bundles/animations.umd.js', '@angular/animations/browser': 'npm:@angular/animations/bundles/animations-browser.umd.js', '@angular/platform-browser/animations': 'npm:@angular/platform-browser/bundles/platform-browser-animations.umd.js',
getting the following error:

Error: (SystemJS) Cannot read property 'prototype' of undefined TypeError: Cannot read property 'prototype' of undefined at __extends (http://localhost:3000/node_modules/@angular/platform-browser/bundles/platform-browser-animations.umd.js:15:68) at eval (http://localhost:3000/node_modules/@angular/platform-browser/bundles/platform-browser-animations.umd.js:328:5) at Object.eval (http://localhost:3000/node_modules/@angular/platform-browser/bundles/platform-browser-animations.umd.js:337:2) at Object.eval (http://localhost:3000/app/app.module.js:10:20) at eval (http://localhost:3000/app/app.module.js:32:4) Evaluating http://localhost:3000/app/app.module.js Evaluating http://localhost:3000/main.js Error loading http://localhost:3000/main.js at __extends (http://localhost:3000/node_modules/@angular/platform-browser/bundles/platform-browser-animations.umd.js:15:68) at eval (http://localhost:3000/node_modules/@angular/platform-browser/bundles/platform-browser-animations.umd.js:328:5) at Object.eval (http://localhost:3000/node_modules/@angular/platform-browser/bundles/platform-browser-animations.umd.js:337:2) at Object.eval (http://localhost:3000/app/app.module.js:10:20) at eval (http://localhost:3000/app/app.module.js:32:4) Evaluating http://localhost:3000/app/app.module.js Evaluating http://localhost:3000/main.js Error loading http://localhost:3000/main.js

kedricz commented 7 years ago

@cacothi I have the same issue. Have you solved the issue?

boschsowl commented 7 years ago

I have the same issue. Also, when I npm install @angular/animations, the package ends up in @angular/platform-browser instead of in its own @angular directory. So @ayyazzafar 's fix doesn't work for me.

ghost commented 7 years ago

how to solve this?

parane commented 7 years ago

when i update angular,i get this error

priyodas12 commented 7 years ago

I am getting still zone.js:2744 GET http://localhost:55263/src/node_modules/@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js 404 (Not Found) index.html:18 Error: (SystemJS) XHR error (404 Not Found) loading http://localhost:55263/src/node_modules/@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js Error: XHR error (404 Not Found) loading http://localhost:55263/src/node_modules/@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js at XMLHttpRequest.wrapFn (http://localhost:55263/node_modules/zone.js/dist/zone.js:1075:39) at ZoneDelegate.invokeTask (http://localhost:55263/node_modules/zone.js/dist/zone.js:425:31) at Zone.runTask (http://localhost:55263/node_modules/zone.js/dist/zone.js:192:47) at ZoneTask.invokeTask [as invoke] (http://localhost:55263/node_modules/zone.js/dist/zone.js:499:34) at invokeTask (http://localhost:55263/node_modules/zone.js/dist/zone.js:1427:14) at XMLHttpRequest.globalZoneAwareCallback (http://localhost:55263/node_modules/zone.js/dist/zone.js:1445:17) Error loading http://localhost:55263/src/node_modules/@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js as "@angular/platform-browser-dynamic" from http://localhost:55263/src/main.js at XMLHttpRequest.wrapFn (http://localhost:55263/node_modules/zone.js/dist/zone.js:1075:39) at ZoneDelegate.invokeTask (http://localhost:55263/node_modules/zone.js/dist/zone.js:425:31) at Zone.runTask (http://localhost:55263/node_modules/zone.js/dist/zone.js:192:47) at ZoneTask.invokeTask [as invoke] (http://localhost:55263/node_modules/zone.js/dist/zone.js:499:34) at invokeTask (http://localhost:55263/node_modules/zone.js/dist/zone.js:1427:14) at XMLHttpRequest.globalZoneAwareCallback (http://localhost:55263/node_modules/zone.js/dist/zone.js:1445:17) Error loading http://localhost:55263/src/node_modules/@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js as "@angular/platform-browser-dynamic" from http://localhost:55263/src/main.js zone.js:2744 GET http://localhost:55263/src/node_modules/@angular/core/bundles/core.umd.js 404 zone.js:2744 GET http://localhost:55263/src/node_modules/@angular/platform-browser/bundles/platform-browser.umd.js 404 (Not Found)

priyodas12 commented 7 years ago

oops I cleared browser cache and all errors gone,but how..

Foxandxss commented 6 years ago

This repository is now deprecated. The Angular Quickstart project was a nice starting point for creating Angular applications. Now we recommend using the Angular CLI to create new Angular projects.

Starting from 1 November 2017, all the Angular documentation, at angular.io, is based on the Angular CLI.

Let's get started

dummy64 commented 6 years ago

clear the browser cache

Torquemada26 commented 6 years ago

I got it working its a combination of ayyazzafar comments on 11 May 2017 ie step 1) added these three lines in systemjs.config.js:

'@angular/animations': 'npm:@angular/animations/bundles/animations.umd.js', '@angular/animations/browser': 'npm:@angular/animations/bundles/animations-browser.umd.js', '@angular/platform-browser/animations': 'npm:@angular/platform-browser/bundles/platform-browser-animations.umd.js',

Step 2) from a stackoverflow answer from here https://stackoverflow.com/questions/43118208/exception-on-using-ng2-tag-input

Make sure the @angular/animations package is installed (e.g. by running npm install @angular/animations). Then, in your app.module.ts

import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

@NgModule({ ..., imports: [ BrowserModule, BrowserAnimationsModule], ... })

Hotalenw commented 6 years ago

@ayyazzafar fix worked for me too.

shravan199 commented 6 years ago

Clear your browser cache Ctrl + Shift + Del. This worked for me.

hamidnoahdi commented 5 years ago

Hard Reload in chrome worked for me