首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >安装用于-npm安装的软件包时出错--保存-开发量角器-黄瓜-框架

安装用于-npm安装的软件包时出错--保存-开发量角器-黄瓜-框架
EN

Stack Overflow用户
提问于 2018-05-31 18:07:23
回答 1查看 631关注 0票数 0

基本上,我正在尝试在我的量角器自动化项目中使用protractor-cucumber-html-report插件。为此,我正在安装生成黄瓜所需的npm包,如下所示-

代码语言:javascript
复制
npm install --save-dev protractor-cucumber-framework

npm install --save-dev cucumber

npm install --save-dev chai

npm install --save-dev chai-as-promised

npm install --save-dev @types/cucumber

npm install --save-dev @types/chai

npm install --save-dev @types/chai-as-promised

但不知何故,在安装过程中,我得到了如下错误:

代码语言:javascript
复制
 329 verbose type range
    330 verbose stack domino: No matching version found for domino@^2.0.1
    330 verbose stack     at pickManifest (C:\Users\bkodalkar\AppData\Roaming\npm\node_modules\npm\node_modules\pacote\node_modules\npm-pick-manifest\index.js:65:11)
    330 verbose stack     at fetchPackument.then.packument (C:\Users\bkodalkar\AppData\Roaming\npm\node_modules\npm\node_modules\pacote\lib\fetchers\registry\manifest.js:52:18)
    330 verbose stack     at tryCatcher (C:\Users\bkodalkar\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23)
    330 verbose stack     at Promise._settlePromiseFromHandler (C:\Users\bkodalkar\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:512:31)
    330 verbose stack     at Promise._settlePromise (C:\Users\bkodalkar\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:569:18)
    330 verbose stack     at Promise._settlePromise0 (C:\Users\bkodalkar\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:614:10)
    330 verbose stack     at Promise._settlePromises (C:\Users\bkodalkar\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:693:18)
    330 verbose stack     at Async._drainQueue (C:\Users\bkodalkar\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\async.js:133:16)
    330 verbose stack     at Async._drainQueues (C:\Users\bkodalkar\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\async.js:143:10)
    330 verbose stack     at Immediate.Async.drainQueues (C:\Users\bkodalkar\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\async.js:17:14)
    330 verbose stack     at runCallback (timers.js:810:20)
    330 verbose stack     at tryOnImmediate (timers.js:768:5)
    330 verbose stack     at processImmediate [as _immediateCallback] (timers.js:745:5)
    331 verbose cwd C:\Source\WK.RetailInterview\WK.RetailInterview\ClientApp
    332 verbose Windows_NT 6.1.7601
    333 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\bkodalkar\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "@angular/cli@latest"
    334 verbose node v8.11.2
    335 verbose npm  v5.6.0
    336 error code ETARGET
    337 error notarget No matching version found for domino@^2.0.1
    338 error notarget In most cases you or one of your dependencies are requesting
    338 error notarget a package version that doesn't exist.
    338 error notarget
    338 error notarget It was specified as a dependency of '@angular/platform-server'
    339 verbose exit [ 1, true ]

我试着安装依赖包和最新的npm,但是没有成功,你能帮我吗?

代码语言:javascript
复制
npm i domino@2.0.1
npm i @angular/platform-server

下面是我的package.json依赖列表:

代码语言:javascript
复制
  "dependencies": {
    "@angular/animations": "6.0.0",
    "@angular/common": "6.0.0",
    "@angular/compiler": "6.0.0",
    "@angular/core": "6.0.0",
    "@angular/forms": "6.0.0",
    "@angular/http": "6.0.0",
    "@angular/platform-browser": "6.0.0",
    "@angular/platform-browser-dynamic": "6.0.0",
    "@angular/platform-server": "^2.0.1",
    "@angular/router": "6.0.0",
    "@nguniversal/module-map-ngfactory-loader": "^5.0.0-beta.5",
    "aspnet-prerendering": "^3.0.1",
    "bootstrap": "^3.3.7",
    "core-js": "^2.4.1",
    "domino": "2.0.1",
    "jquery": "^3.3.1",
    "rxjs": "^6.1.0",
    "zone.js": "^0.8.26"
  },
  "devDependencies": {
    "@angular/cli": "6.0.0",
    "@angular/compiler-cli": "6.0.0",
    "@angular/language-service": "6.0.0",
    "@types/jasmine": "~2.5.53",
    "@types/jasminewd2": "~2.0.2",
    "@types/node": "~6.0.60",
    "codelyzer": "^4.0.1",
    "jasmine-core": "~2.6.2",
    "jasmine-spec-reporter": "~4.1.0",
    "karma": "~1.7.0",
    "karma-chrome-launcher": "~2.1.1",
    "karma-cli": "~1.0.1",
    "karma-coverage-istanbul-reporter": "^1.2.1",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.1.2",
    "ts-node": "~3.2.0",
    "tslint": "~5.7.0",
    "typescript": "2.7.2",
    "@angular-devkit/build-angular": "~0.6.0"
  }
EN

回答 1

Stack Overflow用户

发布于 2018-05-31 18:40:41

运行以下命令时,我也得到了一个错误(ERR 1):

代码语言:javascript
复制
npm install -save--dev domino@^2.0.1

但是将它添加到package.json中:

代码语言:javascript
复制
"domino": "^2.0.1",

和运行一个简单的:

代码语言:javascript
复制
npm install

运行得很好-随后运行npm install命令就可以了。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50621757

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档