[test:execute] TSError: ⨯ Unable to compile TypeScript:
[test:execute] src/step_definitions/DEMO_RESTAPI.steps.ts(5,28): error TS2307: Cannot find module ‘…/dto/messageDto’ or its corresponding type declarations.
[test:execute]
[test:execute] at createTSError (/home/circleci/project/node_modules/ts-node/src/index.ts:692:12)
[test:execute] at reportTSError (/home/circleci/project/node_modules/ts-node/src/index.ts:696:19)
[test:execute] at getOutput (/home/circleci/project/node_modules/ts-node/src/index.ts:883:36)
[test:execute] at Object.compile (/home/circleci/project/node_modules/ts-node/src/index.ts:1185:30)
[
Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
At least one of these environment variable is needed to run this program
I think ensuring the Tomcat server is indeed started would solve your issue.
One thing you can do to ensure this is to make sure your executor has Java runtime set up.
Based on your config, it seems you are using cimg/base:2021.04 as the docker executor but I suspect it may not come with Java runtime.
I have change the docker image
docker:
- image: cimg/openjdk:1.14-node
Starting container cimg/openjdk:1.14-node
Warning: No authentication provided, using CircleCI credentials for pulls from Docker Hub.
image cache not found on this host, downloading cimg/openjdk:1.14-node
Error response from daemon: manifest for cimg/openjdk:1.14-node not found: manifest unknown: manifest unknown