mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
fix(create-astro): TypeScript installation failure with yarn (#8939)
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
This commit is contained in:
parent
46d3043a3f
commit
71455c16c3
2 changed files with 7 additions and 2 deletions
5
.changeset/young-avocados-wink.md
Normal file
5
.changeset/young-avocados-wink.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'create-astro': patch
|
||||
---
|
||||
|
||||
Fixes TypeScript installation issue with yarn
|
|
@ -82,12 +82,12 @@ const FILES_TO_UPDATE = {
|
|||
try {
|
||||
// add required dependencies for astro check
|
||||
if (options.ctx.install)
|
||||
await shell(options.ctx.packageManager, ['install', '@astrojs/check', 'typescript'], {
|
||||
await shell(options.ctx.packageManager, ['add', '@astrojs/check', 'typescript'], {
|
||||
cwd: path.dirname(file),
|
||||
stdio: 'ignore',
|
||||
});
|
||||
|
||||
// inject addtional command to build script
|
||||
// inject additional command to build script
|
||||
const data = await readFile(file, { encoding: 'utf-8' });
|
||||
const indent = /(^\s+)/m.exec(data)?.[1] ?? '\t';
|
||||
const parsedPackageJson = JSON.parse(data);
|
||||
|
|
Loading…
Reference in a new issue