Skip to content

Commit 9e9cba6

Browse files
committed
fix: fix issue with i18n extract on not-prebundled envirtonments: when doing CI in spa tmp, install dev deps also, otherwise vue-i18n-extract is not installed
1 parent 509d3ab commit 9e9cba6

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

adminforth/modules/codeInjector.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ class CodeInjector implements ICodeInjector {
121121
};
122122

123123
console.log(`⚙️ exec: npm ${command}`);
124-
process.env.HEAVY_DEBUG && console.log(`🪲 npm ${command} cwd:`, cwd, 'env:', env);
124+
process.env.HEAVY_DEBUG && console.log(`🪲 npm ${command} cwd:`, cwd);
125125
process.env.HEAVY_DEBUG && console.time(`npm ${command} done in`);
126126
const { stdout: out, stderr: err } = await execAsync(`${nodeBinary} ${npmPath} ${command}`, {
127127
cwd,
@@ -620,7 +620,12 @@ class CodeInjector implements ICodeInjector {
620620

621621
if (allPacks.length) {
622622
const npmInstallCommand = `install ${allPacksUnique.join(' ')}`;
623-
await this.runNpmShell({command: npmInstallCommand, cwd: this.spaTmpPath()});
623+
await this.runNpmShell({
624+
command: npmInstallCommand, cwd: this.spaTmpPath(),
625+
envOverrides: {
626+
NODE_ENV: 'development' // othewrwise it will not install devDependencies which we still need, e.g for extract
627+
}
628+
});
624629
}
625630

626631
await fs.promises.writeFile(hashPath, fullHash);

0 commit comments

Comments
 (0)