Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

179
Views
Karate - karate.configure('headers', { Accept: 'application/json' }); is not recognized in karate-config.js file. It says missing import statements

I have setup a new karate project and everything working fine but when I try to use "karate.configure()" in "karate-config.js" file it does not recognize and when I hover over it, I get this message "missing import statements, insert const karate = require(./Chart.min)"

This is how my "karate-config.js" file looks like: "```

function fn() {

karate.configure("headers", {'Content-Type':'application/x-www-form-urlencoded'})
karate.configure('connectTimeout', 6000000);
karate.configure('readTimeout', 6000000);
var config = {
    baseUrl: 'https://someurl',
    iprHost: 'https://url',


};

return config;

}



And the dependencies I am using are :

"```
 <dependency>
            <groupId>com.intuit.karate</groupId>
            <artifactId>karate-apache</artifactId>
            <version>0.9.6</version>
            <scope>test</scope>
        </dependency>

        <!-- https://mvnrepository.com/artifact/com.intuit.karate/karate-junit4 -->
        <dependency>
            <groupId>com.intuit.karate</groupId>
            <artifactId>karate-junit4</artifactId>
            <version>1.1.0</version>
            <scope>test</scope>
        </dependency>

        <!-- https://mvnrepository.com/artifact/net.masterthought/cucumber-reporting -->
        <dependency>
            <groupId>net.masterthought</groupId>
            <artifactId>cucumber-reporting</artifactId>
            <version>5.6.1</version>
        </dependency>

```"
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Your dependencies are wrong. Also note that we don't support old versions any more. I suggest you use the quick-start as it will set up all you need: https://github.com/karatelabs/karate#quickstart

You can ignore the message about import statements, Karate's version of JS does not need any.

If you are still stuck follow this process: https://github.com/karatelabs/karate/wiki/How-to-Submit-an-Issue

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!