zhangyuang / ssr

A most advanced ssr framework support React17/React18/Vue2/Vue3 on Earth that implemented serverless-side render specification.
http://doc.ssr-fc.com/
MIT License
2.59k stars 283 forks source link

build 的时候ts 校验不过 #333

Closed Imissyou1314 closed 2 months ago

Imissyou1314 commented 2 months ago

verison: 6.2.130

zhangyuang commented 2 months ago

提供可复现仓库or使用最新依赖版本重试

Imissyou1314 commented 2 months ago

[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.

Imissyou1314 commented 2 months ago

"@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"

Imissyou1314 commented 2 months ago

应该是比较新的版本

zhangyuang commented 2 months ago

tsconfig设置 skiplibcheck

Imissyou1314 commented 2 months ago

可以了