'Cucumber.js Couldn't find tsconfig.json. tsconfig-paths will be skipped TSError: ⨯ Unable to compile TypeScript:
I have the following structure
----------- Cucumber-app
-------------------------tsconfig.js
cucumber.js
cucumber.js on the root folder it looks like
const common = `
--require-module ts-node/register
--require-module tsconfig-paths/register
--require Cucumber-app/src/**/*.ts
--tags "not @ignore"
--format progress-bar
--format @cucumber/pretty-formatter
--format-options ${JSON.stringify({ snippetInterface: 'async-await' })}
--publish-quiet
`;
/* eslint-disable */
module.exports = {
default: `${common}`,
};
but when running it always give error
Couldn't find tsconfig.json. tsconfig-paths will be skipped
TSError: ⨯ Unable to compile TypeScript:
Cucumber-app/steps/common.steps.ts:37:45 - error TS2304: Cannot find name 'navigator'.
37 const getUA = await page.evaluate(() => navigator.userAgent);
how to configure tsconfig in cucumber.js
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|