typings/image.d.ts && cssmodule.d.ts не найдены в сборке Vite NX 16.5
Текущее поведение
Я перешел с приложения create-react-app на Vite. Локальный запуск приложения и сборка работают нормально, но когда я пытаюсь развернуть изменения через конвейер Bitbucket, я получаю эту ошибку.
Версия Nx: 16.5.3
tsconfig.json
{
"compilerOptions": {
"jsx": "react-jsx",
"allowJs": false,
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true,
"types": ["vite/client", "vitest"]
},
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.app.json"
},
{
"path": "./tsconfig.spec.json"
}
],
"extends": "../../tsconfig.base.json"
}
tsconfig.app.json
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"types": ["node", "vite/client"]
},
"files": ["../../node_modules/@nx/react/typings/cssmodule.d.ts", "../../node_modules/@nx/react/typings/image.d.ts"],
"exclude": [
"src/**/*.spec.ts",
"src/**/*.test.ts",
"src/**/*.spec.tsx",
"src/**/*.test.tsx",
"src/**/*.spec.js",
"src/**/*.test.js",
"src/**/*.spec.jsx",
"src/**/*.test.jsx"
],
"include": ["src/**/*.js", "src/**/*.jsx", "src/**/*.ts", "src/**/*.tsx"]
}
tsconfig.spec.ts
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"types": ["vitest/globals", "vitest/importMeta", "vite/client", "node"]
},
"include": [
"vite.config.ts",
"src/**/*.test.ts",
"src/**/*.spec.ts",
"src/**/*.test.tsx",
"src/**/*.spec.tsx",
"src/**/*.test.js",
"src/**/*.spec.js",
"src/**/*.test.jsx",
"src/**/*.spec.jsx",
"src/**/*.d.ts"
],
"files": ["../../node_modules/@nx/react/typings/cssmodule.d.ts", "../../node_modules/@nx/react/typings/image.d.ts"]
}
tsconfig.base.json
{
"compileOnSave": false,
"compilerOptions": {
"rootDir": ".",
"sourceMap": true,
"declaration": false,
"moduleResolution": "Node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"importHelpers": true,
"target": "ESNext",
"module": "ESNext",
"lib": ["ES2017", "DOM", "ES2018.Promise", "ESNext"],
"skipLibCheck": true,
"skipDefaultLibCheck": true,
"baseUrl": ".",
"resolveJsonModule": true,
"jsx": "react-jsx",
"allowSyntheticDefaultImports": true,
"strictNullChecks": true,
},
"exclude": ["node_modules", "tmp"]
}
Ожидаемое поведение
tsconfig должен иметь возможность определять путь для ввода данных в модулях узлов.
Действия по воспроизведению
- Создайте реакцию nx с помощью приложения Vite Bundle
- Развертывание с использованием конвейера Bitbucket
Отчет Nx
Node : 20.4.0
OS : darwin-arm64
yarn : 1.22.19
nx (global) : 16.5.3
nx : 16.5.3
@nx/js : 16.5.3
@nx/jest : 16.5.3
@nx/linter : 16.5.3
@nx/workspace : 16.5.3
@nx/cypress : 16.5.3
@nx/devkit : 16.5.3
@nx/eslint-plugin : 16.5.3
@nx/react : 16.5.3
@nrwl/tao : 16.5.3
@nx/vite : 16.5.3
@nx/web : 16.5.3
@nx/webpack : 16.5.3
nx-cloud : 16.1.0
typescript : 5.1.6
Журналы отказов
error TS6053: File '/nx-wspace/node_modules/@nx/react/typings/cssmodule.d.ts' not found.
The file is in the program because:
Root file specified for compilation
error TS6053: File '/nx-wspace/node_modules/@nx/react/typings/image.d.ts' not found.
The file is in the program because:
Root file specified for compilation
Found 2 errors.
> NX Found type errors. See above.
Error: Found type errors. See above.
at validateTypes (/node_modules/@nx/vite/src/utils/executor-utils.js:28:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async viteBuildExecutor (/node_modules/@nx/vite/src/executors/build/build.impl.js:34:9)
Операционная система
- [X] macOS
Дополнительная информация
Нет ответа