Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build 的时候ts 校验不过 #333

Closed
Imissyou1314 opened this issue Jul 8, 2024 · 6 comments
Closed

build 的时候ts 校验不过 #333

Imissyou1314 opened this issue Jul 8, 2024 · 6 comments

Comments

@Imissyou1314
Copy link

  • Copy Complete 21:38:09
    21:38:19
    [TS Error] Cannot find module 'react' or its corresponding type declarations. (node_modules/ssr-common-utils/esm/client/client-store.d.ts:3:29)

verison: 6.2.130

@zhangyuang
Copy link
Owner

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

@Imissyou1314
Copy link
Author

[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
Copy link
Author

"@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
Copy link
Author

应该是比较新的版本

@zhangyuang
Copy link
Owner

tsconfig设置 skiplibcheck

@Imissyou1314
Copy link
Author

可以了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants