4

I’m trying to run skeleton-navigation-typescript-vs on my windows machine but it fails – I see only welcome screen and in developer tools there is a message:

http://localhost:9000/dist/main.js Failed to load resource: the server responded with a status of 404

I do everything from the docs – step by step. http://aurelia.io/docs.html#/aurelia/framework/1.0.0-beta.1.0.8/doc/article/a-production-setup.

When I check in chrome developer tools in Sources tab there are only css, jspm_packages, lib and index.html – there is no dist dir.

Is this working sample? What I’m doing wrong?

dnf
  • 1,659
  • 2
  • 16
  • 29

1 Answers1

4

You are not using the index.html provided by the tutorial. Go to your index.html and replace this:

<body aurelia-app="main">

with this:

<body aurelia-app>

When you specify a value to the aurelia-app attribute, the framework will look for a js file to start the application. More information at http://aurelia.io/docs.html#/aurelia/framework/1.0.0-beta.1.0.8/doc/article/app-configuration-and-startup

EDIT

Create a main.js file inside src folder, like this:

export function configure(aurelia) {
  aurelia.use
    .standardConfiguration()
    .developmentLogging();

  aurelia.start().then(() => aurelia.setRoot());
}

Re-run gulp-watch and see what happens now.

Fabio
  • 11,892
  • 1
  • 25
  • 41
  • 3
    First off all in my opinion when I’m downloading sample it should just work without changing anything. When I try again in VS it works without changing anything… this is very strange – dnf Jan 29 '16 at 22:08
  • I downloaded the sample here and it works fine without changing anything. Are you using the latest version of NodeJS? Try to update NodeJS – Fabio Jan 30 '16 at 01:13
  • OK – on clean machine I’m almost there… I have only windows, chrome and fiddler and then I fallow installation of git, npm, jspm, gulp and configure newest source code release from couple hours ago. Everything worked ok this time (on other machine where I have Visual studio and other stuff the installation failed on ‘npm install’). But when I’m run page with ‘gulp watch’ and try to browse it a see only splash screen and information about connection to bowersync – and it stays this way ;( – dnf Jan 30 '16 at 13:07
  • what about the error message in the browser's console? still the same message? If yes, see my edited answer – Fabio Jan 30 '16 at 19:24
  • OK I finally done this - VS has only web components and Aurelia is also using C++. I think that startup tutorial has lack of required components – python and C++ compilers (VS for example) – dnf Jan 31 '16 at 20:49
  • Well, those python errors happened with me as well. However, they make no difference, even with the errors, everything works fine for me. See this thread http://stackoverflow.com/questions/34299987/aurelia-npm-install-tons-of-gyp-err perhaps it helps – Fabio Feb 01 '16 at 00:49
  • `` caused the problem in my case. Thanks a lot! – IngoB Feb 07 '17 at 21:52