Help for start a new Aurelia project in VS

hi all,

it’s 2 weeks that i’m searching for a starter kit project for Aurelia to be used in VisualStudio(2017).
I found some project but i can use it only compilying it with VS, but i m not able to build the project to have a ‘dist’ directory that i can put in my nodejs server…

The interesting projects are here:

i’m able to work with “skeleton-typescritp”, “skeleton-typescript-webpack”(but this create a confused dist), and both project works with VSCode… than there is “skeleton-typescript-aspnetcore”, this works with visual studio compile but i’m not able to deploy/build the project for nodejs or something else.

Can someone explain how to build?

Thank you a lot if someone will help me.


The aspnetcore template will use ASP.NET Core including the web server there, so I would assume that it does not use NodeJS runtime environment.

I would use the skeleton-typescript-webpack template. According to the readme, this runs a NodeJS HTTP server locally. What dou you mean by “confused dist”?

You might look at this git repository example that shows how to use npm as well as npm called from within a .csproj file. For building you can use “npm run build”, etc. Look at the package.json and Client.csproj file to see a way of doing this. Hopefully this helps.

1 Like

If you have .net core installed you can install Microsoft maintained SPA templates.

dotnet new --install Microsoft.AspNetCore.SpaTemplates::*

Then you should be able to run:

dotnet new aurelia

It will setup a properly scaffolded project.

Spa template is outdated, use the following as a seed

It’s based on that template and updated to wp4 and bs4.

if the aurelia provided spa project template for vs17 is outdated, as compared to current oob 2.1 rc provided ones, is anything in the works to update it so a current solution exists for aurelia?

Is anyone on aurelia team in contact with msft core & vs17 product group to have this project template added as one of the oob vs17 | file | new | project | visual c# | core displayed options?

The team decided to remove the aurelia template because they don’t have resources to support all the possible frameworks.

I’ve just tried using this for updating our project but cannot get it to run. Something is awry with the webpack.config.js file as the error “configuration has an unknown property ‘optimization’” keeps occurring. Attempts to correct this have failed. Please advise how to edit the configuration in webpack.config.js so the project can be run as downloaded from the repository. I already tried restoring the exact versions of the node packages in package.json witjout success

I have seen this error during upgrade from Webpack 3 to 4. Which version are you running?

Have you got global webpack?

I’ve not installed webpack and have used the command NPM uninstall -g webpack just in case. It works OK on another machine. Could be a problem with NodeJS which is likely a hidden dependency The version on the machine that doesn’t work with this project is 8.9.4. The version on the machine that works is 9.5.0. I’ve tried moving NPM and NPM-cache files around between the machines but nothing changes what happens and it does not make sense. Does anyone else have problems with NodeJS? The version of NPM is 4.6.1 on both machines. Is there anything I can try (not keen on changing Node on work development machine in case the main project stops working)?