Skip to content

Commit

Permalink
fix: update require.resolve to fork
Browse files Browse the repository at this point in the history
  • Loading branch information
Skn0tt committed Aug 10, 2023
1 parent e127d43 commit f2cdc4f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/npm/node-install.ts
Expand Up @@ -83,7 +83,7 @@ function installUsingNPM(pkg: string, subpath: string, binPath: string): void {

// Create a temporary directory inside the "esbuild" package with an empty
// "package.json" file. We'll use this to run "npm install" in.
const esbuildLibDir = path.dirname(require.resolve('esbuild'));
const esbuildLibDir = path.dirname(require.resolve('@netlify/esbuild'));
const installDir = path.join(esbuildLibDir, 'npm-install');
fs.mkdirSync(installDir);
try {
Expand Down
2 changes: 1 addition & 1 deletion lib/npm/node-platform.ts
Expand Up @@ -91,7 +91,7 @@ function pkgForSomeOtherPlatform(): string | null {
}

export function downloadedBinPath(pkg: string, subpath: string): string {
const esbuildLibDir = path.dirname(require.resolve('esbuild'));
const esbuildLibDir = path.dirname(require.resolve('@netlify/esbuild'));
return path.join(esbuildLibDir, `downloaded-${pkg}-${path.basename(subpath)}`);
}

Expand Down

0 comments on commit f2cdc4f

Please sign in to comment.