在npm install,angular4上出现茉莉花错误

我想在angular-4项目上运行npm install,它给了我错误,

我的package.json是:

"devDependencies": {
    "@angular/compiler-cli": "^4.4.6","@angular/language-service": "^4.4.6","@compodoc/compodoc": "^1.1.6","@types/jasmine": "^2.8.3",

"typescript": "~2.3.3" in dependencies.


ERROR in /home/infinity/CiscoGit/AS/AS-BAC-BPA/node_modules/@types/jasmine/index.d.ts (138,227): ':' expected.
ERROR in /home/infinity/CiscoGit/AS/AS-BAC-BPA/node_modules/@types/jasmine/index.d.ts (138,47): ';' expected.
ERROR in /home/infinity/CiscoGit/AS/AS-BAC-BPA/node_modules/@types/jasmine/index.d.ts (138,104): ']' expected.
ERROR in /home/infinity/CiscoGit/AS/AS-BAC-BPA/node_modules/@types/jasmine/index.d.ts (138,112): ',' expected.
ERROR in /home/infinity/CiscoGit/AS/AS-BAC-BPA/node_modules/@types/jasmine/index.d.ts (138,113): Property assignment expected.
ERROR in /home/infinity/CiscoGit/AS/AS-BAC-BPA/node_modules/@types/jasmine/index.d.ts (138,121): ')' expected.
ERROR in /home/infinity/CiscoGit/AS/AS-BAC-BPA/node_modules/@types/jasmine/index.d.ts (138,147): '(' expected.
ERROR in /home/infinity/CiscoGit/AS/AS-BAC-BPA/node_modules/@types/jasmine/index.d.ts (138,162): ']' expected.
ERROR in /home/infinity/CiscoGit/AS/AS-BAC-BPA/node_modules/@types/jasmine/index.d.ts (138,163): ',164): Property assignment expected.
ERROR in /home/infinity/CiscoGit/AS/AS-BAC-BPA/node_modules/@types/jasmine/index.d.ts (138,165): Property assignment expected.
ERROR in /home/infinity/CiscoGit/AS/AS-BAC-BPA/node_modules/@types/jasmine/index.d.ts (138,179): ',183): ':' expected.
ERROR in /home/infinity/CiscoGit/AS/AS-BAC-BPA/node_modules/@types/jasmine/index.d.ts (138,208): '{' expected.
ERROR in /home/infinity/CiscoGit/AS/AS-BAC-BPA/node_modules/@types/jasmine/index.d.ts (138,217): ':' expected.
ERROR in /home/infinity/CiscoGit/AS/AS-BAC-BPA/node_modules/@types/jasmine/index.d.ts (138,222): ',90): '(' expected.
ERROR in /home/infinity/CiscoGit/AS/AS-BAC-BPA/node_modules/@types/jasmine/index.d.ts (138,228): Expression expected.
ERROR in /home/infinity/CiscoGit/AS/AS-BAC-BPA/node_modules/@types/jasmine/index.d.ts (138,230): ')' expected.
ERROR in /home/infinity/CiscoGit/AS/AS-BAC-BPA/node_modules/@types/jasmine/index.d.ts (138,68): 'ReadonlyArray' only refers to a type,but is being used as a value here.
ERROR in /home/infinity/CiscoGit/AS/AS-BAC-BPA/node_modules/@types/jasmine/index.d.ts (138,92): The right-hand side of an arithmetic operation must be of type 'any','number' or an enum type.
ERROR in /home/infinity/CiscoGit/AS/AS-BAC-BPA/node_modules/@types/jasmine/index.d.ts (138,94): Cannot find name 'methodName'.
ERROR in /home/infinity/CiscoGit/AS/AS-BAC-BPA/node_modules/@types/jasmine/index.d.ts (138,106): Cannot find name 'string'.
ERROR in /home/infinity/CiscoGit/AS/AS-BAC-BPA/node_modules/@types/jasmine/index.d.ts (138,124): 'ReadonlyArray' only refers to a type,149): The right-hand side of an arithmetic operation must be of type 'any',150): A computed property name must be of type 'string','number','symbol',or 'any'.
ERROR in /home/infinity/CiscoGit/AS/AS-BAC-BPA/node_modules/@types/jasmine/index.d.ts (138,151): Cannot find name 'P'.
ERROR in /home/infinity/CiscoGit/AS/AS-BAC-BPA/node_modules/@types/jasmine/index.d.ts (138,156): Cannot find name 'keyof'.
ERROR in /home/infinity/CiscoGit/AS/AS-BAC-BPA/node_modules/@types/jasmine/index.d.ts (138,162): Cannot find name 'T'.
ERROR in /home/infinity/CiscoGit/AS/AS-BAC-BPA/node_modules/@types/jasmine/index.d.ts (138,180): Cannot find name 'P'.
ERROR in /home/infinity/CiscoGit/AS/AS-BAC-BPA/node_modules/@types/jasmine/index.d.ts (138,217): Cannot find name 'T'.
ERROR in /home/infinity/CiscoGit/AS/AS-BAC-BPA/node_modules/@types/jasmine/index.d.ts (138,219): Cannot find name 'P'.
您在package.json中使用以下 semver作为@ types / jasmine包:
"@types/jasmine": "^2.8.3"

^意味着您的软件包安装程序将下载可用于所述软件包的最新次要版本,在本例中为2.8.11. (如果您访问https://www.npmjs.com/package/@types/jasmine,您会注意到他们在20小时前发布了最新版本2.8.11.)

有两种方法可以解决您的问题:1)确保您的Typescript版本与@ types / jasmine包兼容2)将您的版本锁定到特定版本(2.8.8相当稳定).希望这可以帮助!

相关文章

ANGULAR.JS:NG-SELECTANDNG-OPTIONSPS:其实看英文文档比看中...
AngularJS中使用Chart.js制折线图与饼图实例  Chart.js 是...
IE浏览器兼容性后续前言 继续尝试解决IE浏览器兼容性问题,...
Angular实现下拉菜单多选写这篇文章时,引用文章地址如下:h...
在AngularJS应用中集成科大讯飞语音输入功能前言 根据项目...
Angular数据更新不及时问题探讨前言 在修复控制角标正确变...