question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

app.module 404 (Not Found)

See original GitHub issue

Hi,

I just run npm install and npm start. However, after that it shows the 404 Not found error. Together with these errors below.

Error: (SystemJS) XHR error (404 Not Found) loading http://dalex.me/src/app/app.module Error: XHR error (404 Not Found) loading http://dalex.me/src/app/app.module at XMLHttpRequest.wrapFn [as _onreadystatechange] (http://dalex.me/node_modules/zone.js/dist/zone.js:1190:29) [<root>] at Zone.runTask (http://dalex.me/node_modules/zone.js/dist/zone.js:166:47) [<root> => <root>] at XMLHttpRequest.ZoneTask.invoke (http://dalex.me/node_modules/zone.js/dist/zone.js:416:38) [<root>] Error loading http://dalex.me/src/app/app.module as "./app/app.module" from http://dalex.me/src/main.js at XMLHttpRequest.wrapFn [as _onreadystatechange] (http://dalex.me/node_modules/zone.js/dist/zone.js:1190:29) [<root>] at Zone.runTask (http://dalex.me/node_modules/zone.js/dist/zone.js:166:47) [<root> => <root>] at XMLHttpRequest.ZoneTask.invoke (http://dalex.me/node_modules/zone.js/dist/zone.js:416:38) [<root>] Error loading http://dalex.me/src/app/app.module as "./app/app.module" from http://dalex.me/src/main.js at addToError (http://dalex.me/node_modules/systemjs/dist/system.src.js:122:78) [<root>] at linkSetFailed (http://dalex.me/node_modules/systemjs/dist/system.src.js:695:21) [<root>] at http://dalex.me/node_modules/systemjs/dist/system.src.js:495:9 [<root>] at Zone.run (http://dalex.me/node_modules/zone.js/dist/zone.js:126:43) [<root> => <root>] at http://dalex.me/node_modules/zone.js/dist/zone.js:679:57 [<root>] at Zone.runTask (http://dalex.me/node_modules/zone.js/dist/zone.js:166:47) [<root> => <root>] at drainMicroTaskQueue (http://dalex.me/node_modules/zone.js/dist/zone.js:529:35) [<root>] at XMLHttpRequest.ZoneTask.invoke (http://dalex.me/node_modules/zone.js/dist/zone.js:420:25) [<root>]

Could you please take a look at this?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:9

github_iconTop GitHub Comments

3reactions
jnyanendracommented, Jun 14, 2017

Please check and modify below lines in systemjs.config.js

  1. ‘npm:’: ‘/node_modules/’
  2. ‘app’: ‘/src/app’,
  3. loader: ‘/src/systemjs-angular-loader.js’
0reactions
XerO00commented, Mar 18, 2018

main.ts

import {platformBrowserDynamic} from ‘@angular/platform-browser-dynamic’;

import {AppModule} from ‘./app-module’;

import {AppComponent} from ‘./app.component’;

const platform =platformBrowserDynamic();

platform.bootstrapModule(AppModule)

index.html

<html> <head> <meta charset="utf-8"> <title>First App</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="styles.css"> <link rel="stylesheet" href="./node_modules/bootstrap/dist/css/bootstrap.min.css">
<script src="./node_modules/angular2/bundles/angular2-polyfills.js"></script>
<script src="./node_modules/systemjs/dist/system.src.js"></script>
<script src="node_modules/core-js/client/shim.min.js"></script>
 <link rel="shortcut icon" href="">


<script src="systemjs.config.js"></script>

<script>
  System.import('app').catch( function(err){console.error(err);} ); 
</script>
</head> <body> <my-app>Loading First Angular Application ...</my-app> </body> </html>
Read more comments on GitHub >

github_iconTop Results From Across the Web

404 Error Page displaying automatically when the application ...
But my problem is that when my application get load for the first time, it automatically displaying 404 Error Page or NotFoundComponent.html.
Read more >
Using Angular routes in a single-page application
Adding a 404 pagelink · From the terminal, create a new component, PageNotFound . content_copy ng generate component page-not-found · From your code...
Read more >
Angular 404 page not found| Angular Tutorial - YouTube
404 page in angular is used to display page not found information when the given URL does not match with any page in...
Read more >
My Reactive web app is giving 404 error and I got a module ...
My Reactive web app is giving 404 error and I got a module locked error after publish.
Read more >
How to setup 404 page in angular routing ? - GeeksforGeeks
app -routing.module.ts ... Explanation: Here the route for PagenotfoundComponent is provided inside the routes array. Here any path except the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found