Whenever attempting to execute a protractor test using cucumber, a specific error message is displayed reading: "E/launcher - Process exited with error code 1"

Looking for some assistance. I seem to be stuck and can't pinpoint the issue.

Package.json

{
  "devDependencies": {
    "@cucumber/cucumber": "^7.0.0",
    "@serenity-js/core": "^2.25.7",
    "@serenity-js/cucumber": "^2.25.7",
    "@serenity-js/protractor": "^2.25.7",
    "@types/jasmine": "^3.6.9",
    "@types/node": "^14.14.37",
    "cucumber-html-reporter": "^5.3.0",
    "jasmine": "^3.7.0",
    "protractor-cucumber-framework": "^8.0.1",
    "ts-node": "^9.1.1",
    "typescript": "^4.2.3"
  }
}

   

tsconfig.json

{
"compilerOptions": {
    "target": "es6",
    "module": "commonjs",
    ... (additional settings)
},
"exclude": [
    "node_modules",
    "typescript"
]

}

protractor conf.ts

   -- Code sample here --

When running protractor, I encountered this error:

-- Error message here--

Adding more text because of posting limitations.

UPDATE

I removed some options from cucumberOpts but now facing a different issue.

Error message:

-- Updated error message --

Answer №1

Clearly frustrated with the message:

error: unknown option '--compiler'

Take a closer look at all instances of the word compiler to pinpoint why it doesn't belong

For example, experiment by running the code snippet below:

 cucumberOpts: {
        // compiler: "ts:ts-node/register", <-----------------
        require: [
          'build/features/util/hook.js',
          'build/features/stepDefinition/CalculatorDefinition.js'],
        format: 'json:./cucumberReports/cucumber_report.json',
        tags: false,
      },

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

The form control name cannot be viewed in display mode

When using a reactive form to display information, I encountered an issue where one field in the form group was not rendering the value until the page was refreshed. Here is a simplified version of the code: .ts file private getPhaseParId(id: number) { ...

What is the best way to prevent updating the state before the selection of the end date in a date range using react-datepicker?

Managing user input values in my application to render a chart has been a bit tricky. Users select a start date, an end date, and another parameter to generate the chart. The issue arises when users need to edit the dates using react-datepicker. When the s ...

What is causing the .responseToString function to be recognized as not a function?

Consider the following scenario with Typescript: interface IResponse { responseToString(): string; } export default IResponse; We have two classes that implement this interface, namely RestResponse and HTMLResponse: import IResponse from "./IRespo ...

When using the combination of Cucumber/Capybara with Angular, the test successfully passes with the Selenium driver but does not work with

I've been attempting to conduct feature tests on an Angular application, but I'm experiencing failures when using the poltergeist driver. It appears that the issue stems from the data-binding syntax being interpreted literally. For example, in th ...

Retrieving data from a form input that utilizes reactive checkboxes

Hey there, I am currently working on implementing a Reactive Form and facing an issue with fetching values from checkboxes. It seems that only the value of the first checkbox selected is being recognized while the others are not. Below is the snippet of my ...

Conventions for Encapsulating Private Properties in Typescript

Query: What is the ideal approach for naming private properties in Typescript and should one always create getters and setters for those properties? After perusing this link, I found myself reconsidering what I previously thought to be a good coding pract ...

Enhancing component and view functionality in Angular

Recently, I started working on Angular 11 and encountered a simple yet challenging question. Despite my best efforts, I have been unable to find a suitable answer. In an attempt to utilize Object-Oriented Programming (OOP) concepts within Angular, I create ...

Interfaces in Typescript

In my Angular 2 project, I am working on creating an interface for a complex object. Here is the code snippet of the object: // Defining the render state object this.aRenderState = { model: "", colour: false, showWireframe: false, showGrid: true, ...

Searching for variables within files using Node.js and constructing an object from the results

Trying to figure out how to streamline this process. Here's the directory structure I'm working with: src/ modules/ clients/ i18n/ en-US.ts tasks/ i18n/ en-US.ts So, ea ...

Limiting the scope of TypeScript types to specific keys, such as Exact/DeepExact

After coming across this specific query on SO, I wanted to delve into creating an Exact type. My attempt at implementing something akin to a DeepExact seems to be close: // Desired type that should only accept Exact versions of type Opts = { firstName?: ...

Encountering an endless loop within a data rest API in a React application

Currently, I am in the process of learning React and attempting to utilize the Poke API with my application. Unfortunately, I seem to have run into an infinite loop issue and I am feeling quite lost in terms of troubleshooting it. Below is a snippet of my ...

What's causing the immediate exit when a new Promise is created?

In my case, I am encountering simple scenarios where I need to pause for a few seconds before proceeding with the execution. I attempted to create a separate timeout function by exporting the module or function individually, but nothing seems to be effect ...

What is the best way to utilize the typescript module for detecting and managing typescript errors and warnings in your code?

Currently, I am experimenting with the typescript module to programmatically detect typescript errors. Below is a simplified version of what I have been working on: var ts=require('typescript') var file_content=` interface Message{ a:string ...

Angular 4's Mddialog experiencing intermittent display problem

While using MDDialog in my Angular app, I've encountered a couple of issues. Whenever a user clicks on the div, flickering occurs. Additionally, if the user then clicks on one of the buttons, the afterclose event is not triggered. Can anyone provide ...

React animation failing to render underline animation

After tinkering with the underline animation while scrolling down on Codepen using Javascript, I successfully implemented it. You can check out the working version on Codepen. This animation utilizes Intersection Observer and a generated svg for the underl ...

Receiving an error when attempting to inject the Router in a component constructor without using the elvis operator

Upon launching my app, I desire the route /home to be automatically displayed. Unfortunately, the Angular 2 version I am utilizing does not support the "useAsDefault: true" property in route definitions. To address this issue, I considered implementing th ...

Vue.js and TypeScript combination may result in a 'null' value when using file input

I am attempting to detect an event once a file has been uploaded using a file input. Here is the JavaScript code: fileSelected(e: Event) { if ((<HTMLInputElement>e.target).files !== null && (<HTMLInputElement>e.target).files[0] !== null) { ...

Selenium and Protractor/Jasmine encounter a Chrome Automation Extension Error

UPDATES: New troubleshooting approach. Original Problem will be retained below dashed lines. Upon further investigation, I discovered that the crash was caused by my screenshot reports. I use protractor-jasmine2-screenshot-reporter to generate reports a ...

Must run the angular code in a sequential order

I need to run the code in a specific order; first the foreach loop should be executed, followed by a call to the getHistory() method. Your assistance is greatly appreciated. const execute = async()=>{ await this.currentContent.forEach(async ...

A reflective key error has occurred because the token was not properly defined!

My current setup includes Angular version 2.4.4. However, I encountered an issue when trying to declare a service resolver and register it in both the component module and router. import { Injectable } from '@angular/core'; import { Resolve, Ac ...