2016-06-21 63 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