Closed Imissyou1314 closed 2 months ago
提供可复现仓库or使用最新依赖版本重试
[TS Error] Cannot find module 'react' or its corresponding type declarations. (node_modules/ssr-common-utils/esm/client/client-store.d.ts:3:29)
[TS Error] Cannot find module 'react' or its corresponding type declarations. (node_modules/ssr-common-utils/esm/client/client-store.d.ts:3:29) at Object.error (node_modules/@midwayjs/cli/src/index.ts:62:13) at BuildPlugin.compile (node_modules/@midwayjs/cli-plugin-build/src/index.ts:168:23) at CommandCore.execLifecycle (node_modules/@midwayjs/command-core/src/core.ts:227:11) at CommandCore.invoke (node_modules/@midwayjs/command-core/src/core.ts:187:5) at CLI.start (node_modules/@midwayjs/command-core/src/cli.ts:191:5)
error Command failed with exit code 1.
"@midwayjs/axios": "3", "@midwayjs/decorator": "^2.3.0", "@midwayjs/mock": "^2.13.4", "@midwayjs/web": "^2.3.0", "autoprefixer": "^10.4.19", "axios": "^0.26.1", "callapp-lib": "^3.5.0", "cross-env": "^7.0.3", "dsbridge": "^3.1.4", "egg": "^2.0.0", "egg-scripts": "^2.10.0", "egg-security": "^2.9.0", "js-cookie": "^3.0.1", "mitt": "^3.0.1", "qs-stringify": "^1.2.1", "rxjs": "^6.6.3", "ssr-core-vue3": "^6.0.0", "ssr-hoc-vue3": "^6.0.0", "ssr-server-utils": "^6.0.0", "tailwindcss": "^3.0.0", "vant": "^4.9.1", "vue": "^3.0.0", "vue-router": "^4.0.0", "vuex": "^4.0.0", "webpack": "4.29.5"
应该是比较新的版本
tsconfig设置 skiplibcheck
可以了
verison: 6.2.130