Javascript Can';t使用systemjs构建angular 4项目

Javascript Can';t使用systemjs构建angular 4项目,javascript,asp.net,angular,systemjs,Javascript,Asp.net,Angular,Systemjs,我在VS2017(ASP 5 Web Api)+systemjs中使用Angular 4。 我正在尝试为生产构建Angular应用程序,我在中添加了2个依赖项 package.json "devDependencies": { ..... "gulp": "3.9.1", "systemjs-builder": "0.16.11" } 我已经在asp项目根文件夹中创建了creategulpfile.js var gulp = require('gulp'), B

我在VS2017(ASP 5 Web Api)+systemjs中使用Angular 4。 我正在尝试为生产构建Angular应用程序,我在中添加了2个依赖项 package.json

"devDependencies": {
    .....
    "gulp": "3.9.1",
    "systemjs-builder": "0.16.11"
  }
我已经在asp项目根文件夹中创建了creategulpfile.js

var gulp = require('gulp'),
  Builder = require('systemjs-builder');


gulp.task('bundle-angular-dependencies', function() {
  // optional constructor options
  // sets the baseURL and loads the configuration file
  var builder = new Builder('', 'systemjs.config.js');

  return builder
    .bundle('app/boot.js - [app/**/*.js]', 'path/to/put/angular.bundle.js', { minify: true})
    .then(function() {
      console.log('Build complete');
    })
    .catch(function(err) {
      console.log('Build error');
      console.log(err);
    });
});
然后在我运行的项目的根文件夹中:

gulp bundle-angular-dependencies
得到

Build error
Error: Unable to calculate canonical name to bundle file:///app/boot.js. Ensure that this module sits within the baseURL or a wildcard path config.
    at getCanonicalNamePlain (D:\myapp\node_modules\systemjs-builder\lib\utils.js:227:13)
    at getCanonicalName (D:\myapp\node_modules\systemjs-builder\lib\utils.js:150:19)
    at D:\myapp\node_modules\systemjs-builder\lib\arithmetic.js:171:38
    at <anonymous>
[18:50:43] Finished 'bundle-angular-dependencies' after 604 ms
生成错误
错误:无法计算要绑定的规范名称file:///app/boot.js. 确保此模块位于baseURL或通配符路径配置中。
在getCanonicalNamePlain(D:\myapp\node\u modules\systemjs builder\lib\utils.js:227:13)
在getCanonicalName(D:\myapp\node\u modules\systemjs builder\lib\utils.js:150:19)
位于D:\myapp\node\u modules\systemjs builder\lib\算术.js:171:38
在
[18:50:43]在604毫秒后完成了“捆绑角度相关性”

感谢您的帮助

为什么不为Visual Studio 2017使用新的内置角度模板

文件|新|项目

选择ASP.NET核心Web应用程序模板

然后在“新建ASP.NET核心Web应用程序”对话框中,选择Angular


你好,黛博拉,我没有使用ASP Core,我使用的是ASP 5。我认为这不会起作用。谢谢你看到了:ASP.NET 5是ASP.NET Core。我知道。但是我的数据库提供商现在不完全支持Core。谢谢