尝试升级TypeScript时出错

时间:2017-01-29 03:26:45

标签: angular typescript ionic2

我希望将TypeScript更新为最新版本

首先我在全球范围内做了,然后我在本地尝试了,即

D:\dev\myapp>npm install - typescript@latest 
D:\dev\myapp>npm install  typescript@latest --savedev

我有2个类似的项目(Ionic 2)

第一个(几乎空白的测试项目)工作正常,但第二个我收到以下错误..

 myapp@ D:\dev\myapp 
    `-- typescript@2.1.5  invalid

我查看了package.json,它没有更新(仍然是2.0.9)

我已经尝试了几次,但一直都失败了。我不知道如何追踪它。

有没有人有任何想法?

提前致谢!

[UDPATE] 思想会增加我得到的额外警告

    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.17: wanted {"os":"darwin","arch":"any"} (current:
    {"os":"win32","arch":"x64"})
    npm WARN @ngtools/webpack@1.2.4 requires a peer of @angular/compiler@^2.3.1 but none was installed.
    npm WARN @ngtools/webpack@1.2.4 requires a peer of @angular/compiler-cli@^2.3.1 but none was installed.
    npm WARN @ngtools/webpack@1.2.4 requires a peer of @angular/core@^2.3.1 but none was installed.
    npm WARN @ngtools/webpack@1.2.4 requires a peer of @angular/tsc-wrapped@^0.5.0 but none was installed.
    npm WARN @ngtools/webpack@1.2.4 requires a peer of webpack@2.2.0 but none was installed.
    npm WARN @angular/core@2.4.4 requires a peer of rxjs@^5.0.1 but none was installed.

1 个答案:

答案 0 :(得分:0)

尝试更新npm,然后再试一次,可以做到这一点。

相关问题