You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the npm module typescript is installed with no other TypeScript configuration files defined, Cypress E2E scaffolding should set up a minimum configuration to enable the basic E2E example to run successfully with no errors. This would include adding the file tsconfig.json to the scaffolded Folder Structure.
Why is this needed?
First-time TypeScript users should experience the same smooth set up as JavaScript users currently do when installing Cypress and using a default configuration.
Steps to reproduce
mkdir cy-ts-test
cd cy-ts-test
git init
npm init -y
npm install typescript -D
npm install cypress -D
npx cypress open --e2e --browser electron
Click "Continue"
Click "Create new spec"
Click "Create spec"
Click "Okay, run the spec"
Note the error message
Error: Webpack Compilation Error
[tsl] ERROR
TS18002: The 'files' list in config file 'tsconfig.json' is empty.
Note that if the line npm install typescript -D in the above steps is omitted, then scaffolding and running the example spec is successful.
@MikeMcC399 We did want to make this change, but don't have the time to implement it. I anticipate this work will be a lot more complex than one might think when they start to implement it with all the logic and UI visuals that would be involved. I'll leave this open as a consideration.
Scaffolding a TypeScript project so it runs without editing should also support when package.json is configured with Node.js type field set to module (ESM).
Uh oh!
There was an error while loading. Please reload this page.
What would you like?
If the npm module typescript is installed with no other TypeScript configuration files defined, Cypress E2E scaffolding should set up a minimum configuration to enable the basic E2E example to run successfully with no errors. This would include adding the file
tsconfig.json
to the scaffolded Folder Structure.Why is this needed?
First-time TypeScript users should experience the same smooth set up as JavaScript users currently do when installing Cypress and using a default configuration.
Steps to reproduce
mkdir cy-ts-test cd cy-ts-test git init npm init -y npm install typescript -D npm install cypress -D npx cypress open --e2e --browser electron
Click "Continue"
Click "Create new spec"
Click "Create spec"
Click "Okay, run the spec"
Note the error message
Note that if the line
npm install typescript -D
in the above steps is omitted, then scaffolding and running the example spec is successful.Related issues
tsconfig.json
exists in a TypeScript project #18938The text was updated successfully, but these errors were encountered: