Привет всем. Пытаюсь поставить яндекс карты третей версии (
ссылка на доку).
Но не получается получить прод сборку. React, vite.
Тут Codesanbox, в нем прописал конфиги из своего проекта полностью
В tsconfig выставил
"typeRoots": [
"./node_modules/@types",
"./node_modules/@yandex/ymaps3-types"],
как описано в документации яндекса.
При билде продовской версии идет компиляция тс и все падает с ошибками
error TS2688: Cannot find type definition file for 'modules'.
The file is in the program because:
Entry point for implicit type library 'modules'
error TS2688: Cannot find type definition file for 'packages'.
The file is in the program because:
Entry point for implicit type library 'packages'
Окееей, иду в node_modules\@yandex\ymaps3-types , перемименовываю файлы node_modules\@yandex\ymaps3-types\modules\types.d.ts в node_modules\@yandex\ymaps3-types\module\index.d.ts и второй package так же и все заводится...
хотя в \node_modules\@yandex\ymaps3-types\index.d.ts все импортируется явно
import "./modules/types";
import "./packages/types";
export * from "./imperative";
export * from "./common/types";
export const ready: Promise<void>;
declare const import_: import("./import").Import;
export { import_ as import };
declare global {
const ymaps3: typeof import("./index");
}
Не понимаю как это обойти. Все кеши чистил, модули и локер переустанавливал, выставлял пустой types. Ничего не помогает. Если убрать typeRoots совсем, теряется типизация, что логично.
Третий день борюсь, помогите