2016-06-21 61 views
0

我将基于tutorial/quickstart应用的angular2应用从rc1升级到rc2升级到rc2后Angular2快速启动应用不再工作

npm install报告一切都很好:

npm WARN deprecated [email protected]: 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/[email protected] 
├── @angular/[email protected] 
├── @angular/[email protected] 
├── @angular/[email protected] 
├── @angular/[email protected] 
├── @angular/[email protected] 
├── @angular/[email protected] 
├── @angular/[email protected] 
├── @angular/[email protected] 
├── @angular/[email protected] 
├── [email protected] 
├── [email protected] 
<snip many more> 
npm WARN optional Skipping failed optional dependency /chokidar/fsevents: 
npm WARN notsup Not compatible with your operating system or architecture: [email protected] 

之前,它的工作就好了。现在,加载第一页的时候,我收到了一堆的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 

我在做什么错?

+0

一些背景后回加了几天:我升级了,因为我想用新的路由器,'3.0.0-beta.7',这需要'rc2'。 – Jorn

+0

看起来你没有安装它。配置好你的'packages.json'之后,你做了一个'npm install'吗? – rinukkusu

+0

@rinukkusu我做到了。我会将其添加到问题中。 – Jorn

回答

2

确保你有最新的systemjs.config.js文件。下面块RC2释放 -

function packUmd(pkgName) { 
    packages['@angular/'+pkgName] = { main: '/bundles/' + pkgName + '.umd.js', defaultExtension: 'js' }; 
    } 
+0

是的,就是这样!不幸的是,我现在从我的highcharts依赖中得到同样的错误:'[1] 16.06.23 11:32:12 404 GET/node_modules/angular2-highcharts/dist /'。它曾经在更新之前工作。对不起,我对SystemJS不熟悉。 – Jorn

+0

对于highcharts错误,在tsconfig.json中,是否可以添加像这样排除节点模块 - “排除”:[ “node_modules”] – Sanket