Skip to content

Commit

Permalink
fix: require.resolve call not finding @astrojs/check (#8237)
Browse files Browse the repository at this point in the history
  • Loading branch information
Princesseuh committed Aug 26, 2023
1 parent 3ad5a2a commit 3674584
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/strange-peas-agree.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fix `astro check` not finding the `@astrojs/check` package
2 changes: 1 addition & 1 deletion packages/astro/src/cli/install-package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3674584

Please sign in to comment.