升级到 rc2 后,Angular2 quickstart 应用程序不再有效
Angular2 quickstart app no longer works after upgrade to rc2
我将基于教程/快速入门应用程序的 angular2 应用程序从 rc1
升级到 rc2
。
npm install
报告一切正常:
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
> typings install
typings WARN deprecated 6/2/2016: "registry:dt/core-js#0.0.0+20160317120654" is deprecated (updated, replaced or removed)
typings WARN deprecated 6/19/2016: "registry:dt/node#6.0.0+20160613154055" is deprecated (updated, replaced or removed)
├── core-js (global)
├── jasmine (global)
└── node (global)
├── @angular/common@2.0.0-rc.2
├── @angular/compiler@2.0.0-rc.2
├── @angular/core@2.0.0-rc.2
├── @angular/forms@0.1.0
├── @angular/http@2.0.0-rc.2
├── @angular/platform-browser@2.0.0-rc.2
├── @angular/platform-browser-dynamic@2.0.0-rc.2
├── @angular/router@3.0.0-alpha.7
├── @angular/router-deprecated@2.0.0-rc.2
├── @angular/upgrade@2.0.0-rc.2
├── angular2-in-memory-web-api@0.0.12
├── bootstrap@3.3.6
<snip many more>
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.12
以前,它工作得很好。现在,在加载第一页时,出现了一堆 404 错误:
[1] 16.06.21 12:01:32 404 GET /node_modules/@angular/platform-browser-dynamic/platform-browser-dynamic.umd.js
[1] 16.06.21 12:01:32 404 GET /node_modules/@angular/http/http.umd.js
[1] 16.06.21 12:01:32 404 GET /node_modules/@angular/core/core.umd.js
[1] 16.06.21 12:01:32 404 GET /node_modules/@angular/router-deprecated/router-deprecated.umd.js
[1] 16.06.21 12:01:32 404 GET /node_modules/@angular/platform-browser-dynamic/platform-browser-dynamic.umd.js
[1] 16.06.21 12:01:32 404 GET /node_modules/@angular/http/http.umd.js
[1] 16.06.21 12:01:32 404 GET /node_modules/@angular/router-[1] 16.06.21 12:01:32 404 GET /node_modules/@angular/http/http.umd.js
我做错了什么?
确保您拥有最新的 systemjs.config.js 文件。下面的块是在 RC2 发布后几天添加的-
function packUmd(pkgName) {
packages['@angular/'+pkgName] = { main: '/bundles/' + pkgName + '.umd.js', defaultExtension: 'js' };
}
我将基于教程/快速入门应用程序的 angular2 应用程序从 rc1
升级到 rc2
。
npm install
报告一切正常:
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
> typings install
typings WARN deprecated 6/2/2016: "registry:dt/core-js#0.0.0+20160317120654" is deprecated (updated, replaced or removed)
typings WARN deprecated 6/19/2016: "registry:dt/node#6.0.0+20160613154055" is deprecated (updated, replaced or removed)
├── core-js (global)
├── jasmine (global)
└── node (global)
├── @angular/common@2.0.0-rc.2
├── @angular/compiler@2.0.0-rc.2
├── @angular/core@2.0.0-rc.2
├── @angular/forms@0.1.0
├── @angular/http@2.0.0-rc.2
├── @angular/platform-browser@2.0.0-rc.2
├── @angular/platform-browser-dynamic@2.0.0-rc.2
├── @angular/router@3.0.0-alpha.7
├── @angular/router-deprecated@2.0.0-rc.2
├── @angular/upgrade@2.0.0-rc.2
├── angular2-in-memory-web-api@0.0.12
├── bootstrap@3.3.6
<snip many more>
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.12
以前,它工作得很好。现在,在加载第一页时,出现了一堆 404 错误:
[1] 16.06.21 12:01:32 404 GET /node_modules/@angular/platform-browser-dynamic/platform-browser-dynamic.umd.js
[1] 16.06.21 12:01:32 404 GET /node_modules/@angular/http/http.umd.js
[1] 16.06.21 12:01:32 404 GET /node_modules/@angular/core/core.umd.js
[1] 16.06.21 12:01:32 404 GET /node_modules/@angular/router-deprecated/router-deprecated.umd.js
[1] 16.06.21 12:01:32 404 GET /node_modules/@angular/platform-browser-dynamic/platform-browser-dynamic.umd.js
[1] 16.06.21 12:01:32 404 GET /node_modules/@angular/http/http.umd.js
[1] 16.06.21 12:01:32 404 GET /node_modules/@angular/router-[1] 16.06.21 12:01:32 404 GET /node_modules/@angular/http/http.umd.js
我做错了什么?
确保您拥有最新的 systemjs.config.js 文件。下面的块是在 RC2 发布后几天添加的-
function packUmd(pkgName) {
packages['@angular/'+pkgName] = { main: '/bundles/' + pkgName + '.umd.js', defaultExtension: 'js' };
}