【发布时间】:2017-10-02 16:44:44
【问题描述】:
我们如何将 angular 更新到其最新版本以及相应地更新 package.json 的最佳实践是什么,我需要将 @angular 2.2.0 更新到 @angular 2.2.3,请有人可以在这里写 npm 命令吗?我需要更新,因为 Angular 谷歌地图不适用于以前的版本,应用程序抛出异常知道为什么吗?非常感谢您的回答:)
app/listings/residentialListing/shared/resListing.service.ts(22,27):
error TS2339: Property 'find' does not exist on type 'Res
identialListingModel[]'.
app/listings/residentialListing/shared/resListing.service.ts(22,32):
error TS7006: Parameter 'listing' implicitly has an 'any' type.
node_modules/@agm/core/services/managers/marker-manager.d.ts(9,25):
error TS2304: Cannot find name 'Map'.
node_modules/@angular/common/src/directives/ng_class.d.ts(48,34):
error TS2304: Cannot find name 'Set'.
node_modules/@angular/compiler/src/aot/compiler.d.ts(56,32): error
TS2304: Cannot find name 'Map'.
node_modules/@angular/compiler/src/compile_metadata.d.ts(371,20):
error TS2304: Cannot find name 'Set'.
node_modules/@angular/compiler/src/compile_metadata.d.ts(373,28):
error TS2304: Cannot find name 'Set'.
node_modules/@angular/compiler/src/compile_metadata.d.ts(375,15):
error TS2304: Cannot find name 'Set'.
node_modules/@angular/compiler/src/compile_metadata.d.ts(377,23):
error TS2304: Cannot find name 'Set'.
node_modules/@angular/compiler/src/compile_metadata.d.ts(379,17):
error TS2304: Cannot find name 'Set'.
node_modules/@angular/compiler/src/compile_metadata.d.ts(381,25):
error TS2304: Cannot find name 'Set'.
node_modules/@angular/compiler/src/output/output_ast.d.ts(458,63):
error TS2304: Cannot find name 'Set'.
node_modules/@angular/core/src/change_detection/differs/default_iterable_differ.d.ts(28,32):
error TS2304: Cannot find name 'I terable'.
node_modules/@angular/core/src/change_detection/differs/default_keyvalue_differ.d.ts(24,16):
error TS2304: Cannot find name 'M ap'.
node_modules/@angular/core/src/change_detection/differs/default_keyvalue_differ.d.ts(32,16):
error TS2304: Cannot find name 'M ap'.
node_modules/@angular/core/src/change_detection/differs/iterable_differs.d.ts(15,48):
error TS2304: Cannot find name 'Iterable '.
node_modules/@angular/core/src/change_detection/differs/keyvalue_differs.d.ts(23,18):
error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/di/reflective_provider.d.ts(87,123):
error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/di/reflective_provider.d.ts(87,165):
error TS2304: Cannot find name 'Map'.
node_modules/@angular/http/src/headers.d.ts(52,71): error TS2304:
Cannot find name 'Map'.
node_modules/@angular/http/src/url_search_params.d.ts(46,16): error
TS2304: Cannot find name 'Map'.
node_modules/@angular/platform-browser/src/browser/browser_adapter.d.ts(79,33):
error TS2304: Cannot find name 'Map'.
node_modules/@angular/platform-browser/src/dom/dom_adapter.d.ts(97,42):
error TS2304: Cannot find name 'Map'.
node_modules/@angular/platform-browser/src/dom/shared_styles_host.d.ts(11,30):
error TS2304: Cannot find name 'Set'.
node_modules/@angular/platform-browser/src/dom/shared_styles_host.d.ts(22,30):
error TS2304: Cannot find name 'Set'.
node_modules/@angular/router/src/router_outlet_context.d.ts(42,28):
error TS2304: Cannot find name 'Map'.
node_modules/@angular/router/src/router_outlet_context.d.ts(43,34):
error TS2304: Cannot find name 'Map'.
node_modules/rxjs/Observable.d.ts(58,60): error TS2693: 'Promise' only
refers to a type, but is being used as a value here.
node_modules/rxjs/operator/toPromise.d.ts(3,79): error TS2693:
'Promise' only refers to a type, but is being used as a value h ere.
npm ERR! code ELIFECYCLE npm ERR! errno 2 npm ERR!
product-management@1.0.0 start: `tsc && concurrently "tsc -w"
"lite-server" ` npm ERR! Exit status 2 npm ERR! npm ERR! Failed at the
product-management@1.0.0 start script. npm ERR! This is probably not a
problem with npm. There is likely additional logging output above.
>
npm ERR! A complete log of this run can be found in: npm ERR!
C:\Users\Amina\AppData\Roaming\npm-cache\_logs\2017-10-02T17_11_05_451Z-debug.log
【问题讨论】:
-
我需要更新,因为 Angular 谷歌地图不适用于以前的版本,应用程序抛出异常知道为什么吗?
-
在确切的异常中发布您的代码
-
刚刚更新了我的问题,请查看。
-
将所有
2.1.2更改为例如4.3.6。删除 node_modules 并运行npm i
标签: angular google-maps typescript