dor
5 September 2021 14:05
1
Hi,
From some reason, in each time that I create a new Frontity project I get this 3 errors in “types.ts” :
"Interface ‘MarsTheme’ incorrectly extends interface ‘Package’.
Cannot find Namespace ‘React’.
Type ‘MarsTheme’ does not satisfy the constraint ‘Package’.
How can I handle this errors, and why they appear each time I create a new Frontity project ?
TNX !
If you are using VSCode make sure you are using TS from the local repo, not the globaly installed version as it may be outdated as it was in my case.
I’m using v4.4.3 (global was 3.7.5 and was giving errors).
This should solve your problems.
However there is one problem here:
/**
* Packages required by `MarsThemeTypeScript`.
*/
export type Packages = MergePackages<
Frontity,
Router, // <-- TS error
Source,
Html2React,
ThemePackage
>
Error:
Type 'Router<null>' does not satisfy the constraint 'Package'. Types of property 'actions' are incompatible.
...
And I don’t have any idea right now how to solve this