We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bb5714f commit 1b88861Copy full SHA for 1b88861
src/download.js
@@ -1,7 +1,11 @@
1
import { downloadNodeBinary, fetchLatestNodeVersion } from "./nodeDownloader.js";
2
import fs from 'fs';
3
-const platforms = JSON.parse(fs.readFileSync('./platforms.json', 'utf-8'));
+// Get the directory of the current module
4
+const __filename = fileURLToPath(import.meta.url);
5
+const __dirname = path.dirname(__filename);
6
7
+// Use an absolute path to the platforms.json file
8
+const platforms = JSON.parse(fs.readFileSync(path.join(__dirname, 'platforms.json'), 'utf-8'));
9
10
(async () => {
11
try {
0 commit comments