我想将我的 TypeScript 更新到最新版本
首先我在全球范围内做了,然后我在本地尝试了,即
D:devmyapp>npm install - typescript@latest
D:devmyapp>npm install typescript@latest --savedev
我有 2 个类似的项目(离子 2)
第一个(几乎空白的测试项目)工作正常,但第二个我收到以下错误。
myapp@ D:devmyapp
`-- typescript@2.1.5 invalid
我在package.json中查找,它没有更新(仍然是2.0.9)
我已经尝试了几次,但一直失败。我不知道如何追踪这一点。
有人有什么想法吗?
提前感谢!
[乌德帕特]以为会添加我得到的额外警告
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_moduleschokidarnode_modulesfsevents):
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.
尝试更新 npm,然后重试,可以解决问题。