Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update require.resolve to fork #34

Merged
merged 1 commit into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/npm/node-install.ts
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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