Skip to content

Commit 13fd0ea

Browse files
authored
fix: try to fix the error reported by the stub command in the window system (#4560)
1 parent f701646 commit 13fd0ea

File tree

5 files changed

+4
-6
lines changed

5 files changed

+4
-6
lines changed

docs/src/en/guide/essentials/development.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ The execution command is: `pnpm run [script]` or `npm run [script]`.
9595
// Lint code
9696
"lint": "vsh lint",
9797
// After installing dependencies, execute the stub script for all packages
98-
"postinstall": "turbo run stub",
98+
"postinstall": "pnpm -r run stub --if-present",
9999
// Only allow using pnpm
100100
"preinstall": "npx only-allow pnpm",
101101
// Install husky

docs/src/guide/essentials/development.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ npm 脚本是项目常见的配置,用于执行一些常见的任务,比如
9595
// lint 代码
9696
"lint": "vsh lint",
9797
// 依赖安装完成之后,执行所有包的stub脚本
98-
"postinstall": "turbo run stub",
98+
"postinstall": "pnpm -r run stub --if-present",
9999
// 只允许使用pnpm
100100
"preinstall": "npx only-allow pnpm",
101101
// husky的安装

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"dev:play": "pnpm -F @vben/playground run dev",
5050
"format": "vsh lint --format",
5151
"lint": "vsh lint",
52-
"postinstall": "turbo run stub",
52+
"postinstall": "pnpm -r run stub --if-present",
5353
"preinstall": "npx only-allow pnpm",
5454
"prepare": "is-ci || husky",
5555
"preview": "turbo-run preview",

scripts/turbo-run/src/run.ts

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export async function run(options: RunOptions) {
4646
process.exit(1);
4747
}
4848

49+
process.env.VITE_CJS_IGNORE_WARNING = '1';
4950
execaCommand(`pnpm --filter=${selectPkg} run ${command}`, {
5051
stdio: 'inherit',
5152
});

turbo.json

-3
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@
3030
"dependsOn": ["^build"],
3131
"outputs": [".nitro/**", ".output/**"]
3232
},
33-
"stub": {
34-
"cache": false
35-
},
3633
"test:e2e": {},
3734
"dev": {
3835
"dependsOn": [],

0 commit comments

Comments
 (0)