serenity-js - Error: TypeError: _.chain(...).toPairs is not a function

serenity-js - Error: TypeError: _.chain(...).toPairs is not a function

我有一个项目 package.json 我在 post 上看到了同样的错误,并在 Jan 之前采取了相同的步骤来修复,但无济于事。我已经吹走了我的 node_modules 但仍然出现此错误。有什么想法吗?

    {
  "license": "COMMERCIAL",
  "name": "app",
  "version": "0.0.0",
  "scripts": {
    "ng": "ng",
    "start": "npm run arc-merge-languages && ng serve",
    "build": "npm run arc-merge-languages && ng build",
    "lint": "ng lint",
    "e2e": "ng e2e",
    "arc-merge-languages": "node -e \"require('./node_modules/@arc/arc-frontend-utils/src/index').mergeLanguageFiles()\"",
    "packagr": "ng-packagr -p ./arc-seed-frontend/ng-package.json",
    "packonly": "ng-packagr -p arc-seed-frontend/ng-package.json",
    "preprotractor": "webdriver-manager update --standalone --versions.standalone 3.0.1",
    "protractor": "protractor ./protractor.conf.js",
    "test": "npm run protractor --silent",
    "pretest": "serenity update",
    "report": "serenity run"
  },
  "private": false,
  "dependencies": {
    "@angular/animations": "^5.2.0",
    "@angular/cdk": "^5.0.4",
    "@angular/common": "^5.2.0",
    "@angular/compiler": "^5.2.0",
    "@angular/core": "^5.2.0",
    "@angular/forms": "^5.2.0",
    "@angular/http": "^5.2.0",
    "@angular/platform-browser": "^5.0.0",
    "@angular/platform-browser-dynamic": "^5.0.0",
    "@angular/router": "^5.0.0",
    "@ngrx/effects": "^5.0.1",
    "@ngrx/entity": "^5.0.1",
    "@ngrx/router-store": "^5.0.0",
    "@ngrx/store": "^5.0.0",
    "@ngrx/store-devtools": "^5.0.0",
    "@ngx-translate/core": "^9.1.1",
    "@ngx-translate/http-loader": "^2.0.1",
    "web-animations-js": "^2.3.1",
    "browser-sync": "^2.23.5",
    "chart.js": "^2.7.1",
    "core-js": "^2.5.3",
    "font-awesome": "^4.7.0",
    "fullcalendar": "^3.8.0",
    "jquery": "^3.2.1",
    "moment": "^2.17.1",
    "primeng": "^5.2.0",
    "quill": "^1.3.4",
    "rxjs": "^5.5.6",
    "zone.js": "^0.8.20",
    "intl": "^1.2.5",
    "serenity-js": "^1.10.6"
  },
  "devDependencies": {
    "@angular/cli": "^1.6.4",
    "@angular/compiler-cli": "^5.2.0",
    "@angular/language-service": "^5.2.0",
    "@types/chai": "4.0.0",
    "@types/chai-as-promised": "0.0.31",
    "@types/cucumber": "1.3.1",
    "@types/jasmine": "~2.8.4",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "~9.3.0",
    "angular4-swagger-client-generator": "~0.1.12",
    "chai": "4.0.2",
    "chai-as-promised": "7.0.0",
    "chai-smoothie": "^0.3.2",
    "chrome-headless-launcher": "^0.1.5",
    "codelyzer": "4.0.2",
    "cpx": "^1.5.0",
    "cucumber": "1.3.2",
    "glob": "7.1.2",
    "jasmine-core": "^2.8.0",
    "jasmine-marbles": "^0.2.0",
    "jasmine-spec-reporter": "^4.2.1",
    "karma": "^2.0.0",
    "karma-chrome-launcher": "^2.2.0",
    "karma-cli": "^1.0.1",
    "karma-coverage-istanbul-reporter": "^1.3.3",
    "karma-jasmine": "^1.1.1",
    "karma-jasmine-html-reporter": "^0.2.2",
    "ng-packagr": "^2.0.0",
    "ng-swagger-gen": "^0.10.0",
    "ngc": "^1.0.0",
    "protractor": "^5.2.2",
    "protractor-cucumber-framework": "3.1.2",
    "serenity-cli": "^0.8.0",
    "source-map-explorer": "^1.5.0",
    "ts-node": "^4.1.0",
    "tsickle": "^0.27.2",
    "tslint": "^5.9.1",
    "typescript": "^2.6.2"
  }
}

[09:57:33] I/local - Starting selenium standalone server... [09:57:42] I/local - Selenium standalone server started at http://19.99.39.19:63273/wd/hub [09:57:59] E/launcher - Error: TypeError: _.chain(...).toPairs is not a function

原来我的protractor.conf.js

frameworkPath: require.resolve('serenity-js'),

所以不得不用

替换它
frameworkPath: require.resolve('protractor-cucumber-framework'),