Aurelia app typings

When creating a new solution with the Aurelia app template, i cannot get the typescript definitions to be setup correctly. I think this template should be able to work without any configuration. Just create a solution from the template, run a few commands like npm install, jspm install, and the site is up an running.

Maybe the Aurelia skeleton for typescript can be used to see how typescript def. should be setup. It has more info in its typings.json file. It also uses typings/index.d.ts instead of typings/browser.d.ts.

I will try to fix this myself or at least provide better info on whats going wrong, but not sure when I will get the time.

Aurelia typescript skeleton:

Thanks for posting the issue. All the templates are designed to be able to work and run straight after creation (though some templates have dependencies like TypeScript and NodeJS). Happy to help if people have trouble getting any of the templates up and running.

This issue should now be resolved (as of a few hours ago) and was originally caused due to a change in the way Aurelia provides the d.ts files.

Could you try and create a new project using the latest SSVS (1.0.26) version?

This does use a slightly older version before the removal of d.ts files as I also couldn’t make JSPM and Visual Studio happy when trying to replicate what was done in the skeleton template.

The latest version of SSVS has also updated typings.json to support breaking changes from typings 1.0+.

Any feedback on the updated templates would be appreciated :smile:

I saw the blog post right after I posted my issue. :smile:

The template works great now right out of the box. The only thing I had to do was to run “npm install” and “jspm install” in the project folder. This could be better described in the wiki. It’s just linked to the react template page. But you could just add two lines that says: “run these commands after downloading template: npm install; jspm install”

Thanks for trying it out.

Which version of VS 2015 are you using? Update 2? The latest for me runs npm install after creation automatically and then waits for that process to complete before launching the app which makes it so everything is ready by simply by File -> New Project -> F5 and runs successfully. This could possible be an extension I have, but I don’t think so.

SSVS extension already has some smarts to run this automatically for older versions of VS when particular extensions are not present. I’d rather the `npm installs was done automatically but I might need to tweak SSVS to detect the right conditions. It use to do it automatically regardless but I found it was clashing with other extensions that did the same.

Thanks for the feedback, this helps to make it a better experience for everyone :+1:

It was an issue with my PATH. The postinstall script “cmd /c wwwroot_build\build.bat” returned an error “cmd not recognized …”. I added C:\Windows\System32 to my user path and it worked. I think maybe my System path is too long so it was clipped.

Anyway the template is working fine now! No need to run any commands to get the site running.

1 Like