- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
升级到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
我知道如果没有代码就不容易解决问题,但也许有人有同样的错误并想通了。
现有的帖子没有解决我的问题
更新:系统.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 });
关于Angular2 升级到 RC6,找不到 traceur,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39294548/
我正在尝试在 Windows 上运行的小于 1GB 的 VM 上设置 YouTrack 和 TeamCity。使用率将非常低(用户和请求)。这是一个 POC 环境,如果它有效,我可能会将它推送到一个超
所以我在尝试使用 FORFILES 解决这个问题时遇到了麻烦。我正在尝试获取不超过 4 天的文件。所以基本上少于 4 天。然而,这似乎不太可能,因为/d -4 获取所有 4 天或更早的项目。 以下是我
如何从下面的 events 表中选择小于 15 分钟前创建的 events? CREATE TABLE events ( created_at timestamp NOT NULL DEFAU
Google Analytics Realtime提供 rt:minutesAgo ,可以过滤查询。 然而,它是一个维度而不是一个度量标准,<=不能在过滤器中使用。 假设我想在最后 n 分钟内获得一些
iOS 核心数据 - 严重的应用程序错误 - 尝试插入 nil 你好, 我的应用程序实际上运行稳定,但在极少数情况下它会崩溃并显示此错误消息... 2019-04-02 20:48:52.437172
我想制作一个 html div 以快速向右移动(例如不到 1 秒)并消失。然后1秒后再次直接出现在这个过程最开始div的位置。此过程将由单击按钮并重复 10 次触发。 我试图在 CSS 中使用过渡属性
我发现使用 TimeTrigger 是 Windows 10 (UWP) 上计划后台任务的方式。但是看起来我们需要给出的最小数字是 15 分钟。只是想知道,即使我们安排它在接下来的 1 分钟内运行,警
我必须在 1 秒内在屏幕上打印 2^20 行整数 printf 不够快,还有其他易于使用的快速输出替代方法吗? 每一行只包含 1 个整数。 我要求它用于竞争性编程问题,我必须将其源代码提交给法官。 最
我是一名优秀的程序员,十分优秀!