fix: require.resolve call not finding @astrojs/check (#8237)
This commit is contained in:
parent
3ad5a2a287
commit
3674584e02
2 changed files with 6 additions and 1 deletions
5
.changeset/strange-peas-agree.md
Normal file
5
.changeset/strange-peas-agree.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Fix `astro check` not finding the `@astrojs/check` package
|
|
@ -22,7 +22,7 @@ export async function getPackage<T>(
|
|||
|
||||
let packageImport;
|
||||
try {
|
||||
require.resolve(packageName);
|
||||
require.resolve(packageName, { paths: [options.cwd ?? process.cwd()] });
|
||||
|
||||
// The `require.resolve` is required as to avoid Node caching the failed `import`
|
||||
packageImport = await import(packageName);
|
||||
|
|
Loading…
Reference in a new issue