Angular2升级到RC6,找不到traceur

2023-12-19

升级到后RC6,出现以下错误:

zone.js:101 GET http://localhost/traceur 404 (Not Found)
zone.js:484 Unhandled Promise rejection: Error: XHR error (404 Not Found) loading http://localhost/traceur
            at XMLHttpRequest.wrapFn [as _onreadystatechange] (http://localhost/vendor/zone.js/dist/zone.js:794:30)
            at ZoneDelegate.invokeTask (http://localhost/vendor/zone.js/dist/zone.js:365:38)
            at Zone.runTask (http://localhost/vendor/zone.js/dist/zone.js:265:48)
            at XMLHttpRequest.ZoneTask.invoke (http://localhost/vendor/zone.js/dist/zone.js:433:34)
        Error loading http://localhost/traceur
        Error loading http://localhost/vendor/@angular/platform-browser-dynamic/index.js as "@angular/platform-browser-dynamic" from http://localhost/main.js ; Zone: <root> ; Task: Promise.then ; Value: Error: Error: XHR error (404 Not Found) loading http://localhost/traceur(…) null
zone.js:486 Error: Uncaught (in promise): Error: Error: XHR error (404 Not Found) loading http://localhost/traceur(…)
system.src.js:371 Assertion failed: loading or loaded

我知道没有代码就不容易解决问题,但也许有人有同样的错误并弄清楚了。

现有帖子无法解决我的问题

UPDATE:系统.config.js:

// SystemJS configuration file, see links for more information
// https://github.com/systemjs/systemjs
// https://github.com/systemjs/systemjs/blob/master/docs/config-api.md

/***********************************************************************************************
 * User Configuration.
 **********************************************************************************************/
/** Map relative paths to URLs. */
const map: any = {
  "ng2-charts": "vendor/ng2-charts",
  'ng2-bs3-modal': 'vendor/ng2-bs3-modal',
  'angular2-moment': 'vendor/angular2-moment',
  "assets": "assets",
};

/** User packages configuration. */
const packages: any = {
  "ng2-charts": {main: 'ng2-charts.js'},
  "ng2-bs3-modal": {main: 'ng2-bs3-modal.js'},
  "angular2-moment": {main: 'index.js'}
};

////////////////////////////////////////////////////////////////////////////////////////////////
/***********************************************************************************************
 * Everything underneath this line is managed by the CLI.
 **********************************************************************************************/
const barrels: string[] = [
  // Angular specific barrels.
  '@angular/core',
  '@angular/common',
  '@angular/compiler',
  '@angular/forms',
  '@angular/http',
  '@angular/router',
  '@angular/platform-browser',
  '@angular/platform-browser-dynamic',

  // Thirdparty barrels.
  'rxjs',

  // App specific barrels.
  'app',
  'app/shared',
  'app/shared/navbar',
  'app/shared/sidebar',
  'app/shared/footer',
  'app/dashboard',
  'app/docs',
  /** @cli-barrel */
];

const cliSystemConfigPackages: any = {};
barrels.forEach((barrelName: string) => {
  cliSystemConfigPackages[barrelName] = { main: 'index' };
});

/** Type declaration for ambient System. */
declare var System: any;

// Apply the CLI SystemJS configuration.
System.config({
  map: {
    '@angular': 'vendor/@angular',
    'rxjs': 'vendor/rxjs',
    'main': 'main.js',
  },
  packages: cliSystemConfigPackages
});

// Apply the user's configuration.
System.config({ map, packages });

更新2:我将 system.config.js 更改为以下内容:

// SystemJS configuration file, see links for more information
// https://github.com/systemjs/systemjs
// https://github.com/systemjs/systemjs/blob/master/docs/config-api.md

/***********************************************************************************************
 * User Configuration.
 **********************************************************************************************/
/** Map relative paths to URLs. */
const map: any = {
  "ng2-charts": "vendor/ng2-charts",
  'ng2-bs3-modal': 'vendor/ng2-bs3-modal',
  'angular2-moment': 'vendor/angular2-moment',
  "assets": "assets",
};

/** User packages configuration. */
const packages: any = {
  "ng2-charts": {main: 'ng2-charts.js'},
  "ng2-bs3-modal": {main: 'ng2-bs3-modal.js'},
  "angular2-moment": {main: 'index.js'}
};

////////////////////////////////////////////////////////////////////////////////////////////////
/***********************************************************************************************
 * Everything underneath this line is managed by the CLI.
 **********************************************************************************************/
const barrels: string[] = [
  // App specific barrels.
  'app',
  'app/shared',
  'app/shared/navbar',
  'app/shared/sidebar',
  'app/shared/footer',
  'app/dashboard',
  'app/docs',
  /** @cli-barrel */
];

const cliSystemConfigPackages: any = {};
barrels.forEach((barrelName: string) => {
  cliSystemConfigPackages[barrelName] = { main: 'index' };
});

/** Type declaration for ambient System. */
declare var System: any;

// Apply the CLI SystemJS configuration.
System.config({
  map: {
    'main': 'main.js',
  },
  packages: cliSystemConfigPackages
});

// Apply the user's configuration.
System.config({ map, packages });

System.config({
  //use typescript for simple compilation (no typechecking)
  //transpiler: 'typescript',
  //typescript compiler options
  //typescriptOptions: {
  //emitDecoratorMetadata: true
  //},
  paths: {
    'npm:': 'vendor/'
  },
  map: {
    'app': './src',

    '@angular/core': 'npm:@angular/core/bundles/core.umd.js',
    '@angular/common': 'npm:@angular/common/bundles/common.umd.js',
    '@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
    '@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
    '@angular/http': 'npm:@angular/http/bundles/http.umd.js',
    '@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
    '@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
    '@angular/router': 'npm:@angular/router/bundles/router.umd.js',


    '@angular/core/testing': 'npm:@angular/core/bundles/core-testing.umd.js',
    '@angular/common/testing': 'npm:@angular/common/bundles/common-testing.umd.js',
    '@angular/compiler/testing': 'npm:@angular/compiler/bundles/compiler-testing.umd.js',
    '@angular/http/testing': 'npm:@angular/http/bundles/http-testing.umd.js',
    '@angular/platform-browser/testing': 'npm:@angular/platform-browser/bundles/platform-browser-testing.umd.js',
    '@angular/platform-browser-dynamic/testing': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic-testing.umd.js',
    '@angular/router/testing': 'npm:@angular/router/bundles/router-testing.umd.js',

    'rxjs': 'npm:rxjs'
  },
  //packages defines our app package
  packages: {
    app: {
      main: './main.ts',
      defaultExtension: 'ts'
    },
    rxjs: {
      defaultExtension: 'js'
    }
  }
});

现在我收到以下错误:

zone.js:101 GET http://localhost/vendor/@angular/common/bundles/common.umd.js/src/directives/core_directives 404 (Not Found)

下午好, 我一整天都有同样的问题。在咨询了几个不同的链接后,我终于通过将 system.config.ts 更改为以下内容来启动并工作:

"use strict";
// SystemJS configuration file, see links for more information
// https://github.com/systemjs/systemjs
// https://github.com/systemjs/systemjs/blob/master/docs/config-api.md
/***********************************************************************************************
 * User Configuration.
 **********************************************************************************************/
/** Map relative paths to URLs. */
const map: any = {
    "@angular": "vendor/@angular",
    "rxjs": "vendor/rxjs",
    "typescript": "node_modules/typescript/lib/typescript.js",
    "materialize": "vendor/materialize-css",
    "angular2-materialize": "vendor/angular2-materialize",
    "jquery": "vendor/jquery"
};
/** User packages configuration. */
const packages: any = {
    "materialize": {
        "format": "global",
        "main": "dist/js/materialize",
        "defaultExtension": "js"
    },
    "angular2-materialize": {
        "main": "dist/index",
        "defaultExtension": "js"
    },
    "@angular/core": {
        main: "bundles/core.umd.js" //use the ESM entry point for bundling tools
    },
    "@angular/common": {
        main: "bundles/common.umd.js" //use the ESM entry point for bundling tools
    },
    "@angular/compiler": {
        main: "bundles/compiler.umd.js" //use the ESM entry point for bundling tools
    },
    "@angular/forms": {
        main: "bundles/forms.umd.js"
    },
    "@angular/http": {
        main: "bundles/http.umd.js"
    },
    "@angular/platform-browser": {
        main: "bundles/platform-browser.umd.js" //use the ESM entry point for bundling tools
    },
    "@angular/platform-browser-dynamic": {
        main: "bundles/platform-browser-dynamic.umd.js" //use the ESM entry point for bundling tools
    },
    "@angular/router": {
        main: "bundles/router.umd.js" //use the ESM entry point for bundling tools
    },
};
////////////////////////////////////////////////////////////////////////////////////////////////
/***********************************************************************************************
 * Everything underneath this line is managed by the CLI.
 **********************************************************************************************/
const barrels: string[] = [
    // Angular specific barrels.
    "@angular/core",
    "@angular/common",
    "@angular/compiler",
    "@angular/forms",
    "@angular/http",
    "@angular/router",
    "@angular/platform-browser",
    "@angular/platform-browser-dynamic",

    // Thirdparty barrels.
    "rxjs",

    // App specific barrels.
    "app"
    /** @cli-barrel */
];
const cliSystemConfigPackages: any = {};
barrels.forEach((barrelName: string) => {
    cliSystemConfigPackages[barrelName] = { main: "index" };
});

/** Type declaration for ambient System. */
declare var System: any;

// Apply the CLI SystemJS configuration.
System.config({
    map: {
        "@angular": "vendor/@angular",
        "rxjs": "vendor/rxjs",
        "jquery": "node-modules/jquery",
        "materialize-css": "node-modules/materialize-css",
        "angular2-materialize": "node_modules/angular2-materialize",
        "main": "main.js"
    },
    packages: cliSystemConfigPackages
});
// Apply the user"s configuration.
System.config({ map, packages });
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Angular2升级到RC6,找不到traceur 的相关文章

随机推荐

  • 冒充标准用户

    我正在尝试创建一个正在运行的进程 该进程被提升为使用标准用户令牌重新启动资源管理器 我所做的是首先以管理员身份运行主进程 然后拍摄运行的快照 if Process32First hSnapshot pe32 do if wcsicmp pe
  • 控制 r Shiny 中传单中 popupImage 的大小

    我很难控制图像的大小popupImage 地图视图包 下面是一个可重现的闪亮示例 其中我有一个带有弹出窗口的标记 当我设置width 300 弹出窗口显示正确 但我想显示更大的图像 宽度 300 https i stack imgur co
  • Catalyst“SwiftUI.AccessibilityNode”不是已知的可序列化元素

    我使用 Xcode 11 1 创建了一个新的 iOS 单页应用程序 包括 SwiftUI 并启用了 Mac Catalyst 在我的 Mac 当然是 macOS 10 15 上运行新项目后 在窗口上点击一次后出现以下错误 2019 10 1
  • ASP-Net MVC5 Crystal Reports:系统找不到指定的路径

    有什么建议么 Code ReportDocument rpt new ReportDocument rpt Load Server MapPath CrystalReports P Order rpt TableLogOnInfo logo
  • 有没有关于 Spanned 和 Spannable 文本的示例

    我正在努力使用 EditText 和 Spannable 文本对象 这些天 我已经阅读了 API 文档大约十次 即使我不确定我是否理解正确 所以我正在寻找一种示例来展示如何使用 EditText 和 Spannable 由于您没有指定您无法
  • 如何修改Imagenet Caffe模型?

    我想修改 ImageNet caffe 模型 如下所述 由于时间网络的输入通道数与此不同 空间网络 20 vs 3 我们对 ImageNet 模型滤波器进行平均 先跨过通道一层 然后复制平均结果 20 时间网络的初始化 我的问题是如何才能达
  • 在 Google Chrome 中使用 MediaStream API 更改 FocusMode 不起作用

    在 Google Chrome 浏览器中 我能够使用以下方式实时获取连接的 USB 摄像头的实时信息 获取用户媒体 API 我有一个滑块可以更改亮度值 效果很好 我还希望 focusMode 从连续的 to manual 相机始终以连续对焦
  • 仅将 jetty url-pattern 与根目录匹配

    我只想用密码保护 Jetty Web 应用程序的上下文路径上的根目录 我的上下文路径是 MyApp 所以我需要密码才能访问 http localhost 8080 MyApp 但不适用于 http localhost 8080 MyApp
  • 如何在 TestCafe 中等待元素消失?

    当我需要等待元素变得可见时 我可以简单地将选择器作为函数调用 如下所示 await element with visibilityCheck true 但我怎样才能等待一个元素消失呢 要等待元素消失 您可以使用我们内置的断言等待机制 请参见
  • 找到将小数转换为整数的公共乘数的算法

    我有一个可能最多有 8 位小数的数字数组 我需要找到可以将它们相乘的最小公共数 以便它们都是整数 我需要这个 以便所有原始数字都可以乘以相同的比例 并由仅处理整数的密封系统进行处理 然后我可以检索结果并将它们除以公共乘数以获得相对结果 目前
  • geom_text 在所有方面写入所有数据

    我将 ggplot 与facet grid 一起使用 我想在每个方面指示每个方面的观察数量 我遵循许多网站上提供的示例 但是当我让它写任何东西时 它会在所有四个图上将所有四个观察数字写在彼此之上 这里是 geom text 图层命令 geo
  • macOS SwiftUI 表超过 10 列?

    我尝试添加 Group 技巧以在 Table 视图中获取超过 10 个元素 但是无法编译 就像有超过 10 个元素没有组一样 var body some View Table viewModel tableArrayOfStructs so
  • Mysql 连接器花费 50% 的时间在 com.mysql.jdbc.util.ReadAheadInputStream.fill()

    我正在分析使用 Spring Hibernate 和 mysql java connector 的应用程序 VisualVM显示超过50 的CPU时间花费在com myql jdbc utils ReadAheadInputStream f
  • Android sqlite 多线程

    我正在编写一个 Android 应用程序 使用sqlite 有多种活动和一项服务 我从多个线程使用数据库 它完美地工作在Android 2 X 但是一旦我运行它Android 3 X它总是抛出这个错误并且Force Close 05 04
  • 将自定义方法集成到 LINQ to Entities 查询中

    我有一个自定义方法 可以对一组数据执行一些计算 private int GetPercentages int OriginalValue int TotalValue var newValue int Math Round decimal
  • 刷新Core Data数据库的正确方法

    我的应用程序经过设置 以便在首次使用时 它会从基于 Web 的 xml 源下载所需的数据 用户还可以选择通过设置定期刷新数据 当他们这样做时 我想删除现有数据库 然后通过我用于第一次加载的代码重新创建它 我读到 简单地删除数据库并不是执行此
  • Android 中的 MD5 哈希

    我有一个简单的 Android 客户端 需要与一个简单的 C HTTP 侦听器 对话 我想通过在 POST 请求中传递用户名 密码来提供基本级别的身份验证 MD5 哈希在 C 中是微不足道的 并且为我的需求提供了足够的安全性 但我似乎无法找
  • 从ggplot2中提取颜色信息?

    使用保存在名为的文件中的虚拟代码foo txt COG station1 station2 station3 station4 station5 COG000Z 0 019393497 0 183122497 0 089911227 0 2
  • 如何在 ASP.NET Core 中使用区域

    我如何使用Area在 ASP NET Core 中 我有一个需要管理部分的应用程序 该部分要求将其视图放置在该区域中 所有以以下开头的请求Admin 需要重定向到该区域 为了在 ASP NET Core 应用程序中包含区域 首先我们需要在S
  • Angular2升级到RC6,找不到traceur

    升级到后RC6 出现以下错误 zone js 101 GET http localhost traceur 404 Not Found zone js 484 Unhandled Promise rejection Error XHR er