zkapp-cli icon indicating copy to clipboard operation
zkapp-cli copied to clipboard

Cannot find name '...' Jest TS error fix

Open shimkiv opened this issue 2 years ago • 2 comments

Otherwise test sources will highlight the Cannot find name '...' (Jest methods) errors within generated projects.

shimkiv avatar Sep 04 '22 07:09 shimkiv

I seemingly can't reproduce the Cannot find name '...' error when creating a new project.

Shouldn't the types for Jest be installed when creating a new project (in the dev deps)? By including the test files in the tsconfig, TS will also include them in the output bundle which increases the bundle size and should probably avoid if we can.

MartinMinkov avatar Sep 06 '22 16:09 MartinMinkov

Thanks @MartinMinkov for taking a look. This is weird. Jest types are installed as devDependencies: "@types/jest": "^27.0.3", yet still I'm facing that issue. Will check with fresh instalment then.

shimkiv avatar Sep 06 '22 16:09 shimkiv