CLI - .NET Core run errors

I am using cli 1.3.1 and created a asp.net core project using the builtin bundler.

When I do a dotnet run I get:
Error: Cannot find module ‘aspnet-webpack’

I tried creating one with webpack as well

√ Would you like to use the default setup or customize your choices? · Custom App
√ Which bundler would you like to use? · Webpack
√ Which HTTP Protocol do you wish the outputted Webpack bundle to be optimised for? · HTTP/2
√ What platform are you targeting? · .NET Core
√ What transpiler would you like to use? · TypeScript
√ How would you like to setup your HTML template? · Maximum Minification
√ What css preprocessor would you like to use? · Sass
√ Do you want to add PostCSS processing · Typical
√ Which unit test runner would you like to use? · Karma + Jasmine
√ Would you like to configure integration testing? · Protractor
√ What is your default code editor? · Visual Studio Code
√ Which features do you want scaffolded into your project? · Navigation App
√ Would you like to add a Dockerfile? · No

Getting this error on dotnet run:
Error: clean-webpack-plugin only accepts an options object. See:
https://github.com/johnagan/clean-webpack-plugin#options-and-defaults-optional

Can anyone else create a asp.net core project using the cli successfully?

1 Like

It’s fixed here https://github.com/aurelia/v1/commit/5d8109a422a5132d41476e9fcdf4e8bed821e385

Please use npx makes aurelia/v1 to create new project.
The skeleton is extracted out of aurelia-cli repo, next aurelia-cli release’s au new will simply wrap npx makes aurelia/v1.

1 Like

Thanks, I generally am the problem and just wanted to verify.

I am still not able to do a dotnet run with the same error of: cannot find aspnet.webpack, when using the builtin bundler/alameda.

I was able to get dotnet run to work with all the same options, but using webpack.

1 Like

Another followup question, wasn’t sure if I should break this out or not so error’d on the not side.

Is there a reason that build command no longer creates a dist directory?
As well, its not deleting old script packages and ends up with a lot of junk in the scripts directory so you can’t out of the box just move/copy that directory.

I can of course modify everything, but that was a standard convention that I found eased moves to production/staging for only files that need to move.

1 Like

The Startup.cs only provided integration with webpack. Probably we should remove dotnet option when user picked cli-bundler.

Yes, you are right. The cli-bundler au build should clean up the output directory too. I will fix that (update: done).

1 Like

So you say dist, but I think you meant scripts?
There is no dist being created with build --env prod.
That was the other question on if that is a permanent removal, or just something that isn’t there yet/missed.

And thanks, that was fast :wink:

1 Like

The clean step was not there, and it should be. It was missed.

1 Like