Closed rnreekez closed 3 years ago
Thanks for the investigation. Yet, I don’t think I understand exactly what’s going on: Are you running into this issue when trying to use caxa in your project, or when trying to build caxa from source?
If you’re trying to use caxa in your project, then you shouldn’t have to run tsc
on the caxa folder, because the npm package already includes the compiled JavaScript.
If you’re trying to build caxa from source, then the version of TypeScript is locked. Could it be that yarn is getting a different version than npm would?
In any case, you make a good point that moving forward, when I get around to updating to TypeScript 4.4, we’ll want to put a type annotation on the catch
block.
Wow sorry for the delay. Yes you are correct, my mistake. I was actually running this from a forked version which did not have the build published via NPM. I'll go ahead and close this since it looks like you have typescript 4.4 on your radar, the compiler will surface these for you. Thanks for the project!
Hi, just a heads up. Since caxa requires execution of the prepare npm script as part of install, there are now errors being thrown at installation. This one a little tough too because I work exclusively on a mac and i've only encountered this on Windows boxes.
I ran into this on my own project and I believe it boils down to whether or not the workspace is leveraging Typescript 4.4.
Snippet throwing compile error: https://github.com/leafac/caxa/blob/main/source/index.ts#L317-L319 Change introduced with TS 4.4
If i'm not mistaken this is now the default behavior if your tsconfig file is set to "strict".
I'm thinking you'll either want to pin the version of typescript or go ahead and add the type check within the snippet.