2017-09-27 64 views
0

我已經重新安裝了npm,我試圖運行一個命令npm start但我收到如下消息。不幸的是,我的想法結束了。誰能幫我? 我安裝的版本2.3.4,但它沒有工作錯誤的配置npm

@angular/[email protected] requires [email protected]'>=2.1.0 <2.4.0' but 2.4.0 was found instead. 
Using this version can result in undefined behaviour and difficult to debug problems. 

Please run the following command to install a compatible version of TypeScript. 

npm install [email protected]'>=2.1.0 <2.4.0' 
ERROR in C:/Users/Desktop/office/node_modules/frontend-components/lib/multi-application/dynamic-form/fields/employment-field/employment-field.component.ts (121,5): Type '{ averageIncome: FormControl; pensionerCardId: FormControl; companyName: FormControl; companyNip:...' is not assignable to type 'Options<FormControl>'. 
Property 'name' is missing in type '{ averageIncome: FormControl; pensionerCardId: FormControl; companyName: FormControl; companyNip:...'. 
ERROR in C:/Users/Desktop/office/backoffice/node_modules/fobos-frontend-components/lib/multi-application/dynamic-form/fields/employment-field/employment-field.component.ts (141,5): Type '{ averageIncome: false; pensionerCardId: false; companyName: false; companyNip: false; phoneNumbe...' is not assignable to type 'Options<boolean>'. 
Property 'name' is missing in type '{ averageIncome: false; pensionerCardId: false; companyName: false; companyNip: false; phoneNumbe...'. 
ERROR in C:/Users/Desktop/office/backoffice/src/app/campaigns/campaign-file/campaign-file.resolver.ts (59,5): Type '{ periodType: "Days"; startPeriod: number; endPeriod: number; startNetAmount: number; application...' is not assignable to type 'CampaignFinancialParameters'. 
Property 'startPeriodType' is missing in type '{ periodType: "Days"; startPeriod: number; endPeriod: number; startNetAmount: number; application...'. 

回答

1

它說,在返回的錯誤消息一旦運行,它應該安裝打字稿兼容版本的運行命令npm install [email protected]'>=2.1.0 <2.4.0'

+0

我安裝了打字機2.3.4但沒有工作 – danio900409

+1

什麼是響應?這也只是爲了一個項目或全球安裝。如果它是全局的,那麼首先嚐試'npm uninstall -g typescript',如果它不是全局的,那麼嘗試'npm uninstall typescript',然後用npm install -g [package name/version]再次安裝typescript,如果它是全局的或'npm install [package名稱/版本]'如果不是。 – zillaofthegods

+1

這是正確的答案,但不應該有必要降級。我已經運行併成功地發佈了針對該版本Angular的更高版本的應用程序。 –