@netlify/build 18.25.0 → 18.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -26,7 +26,17 @@ const addTsErrorInfo = async function (error, pluginPath) {
|
|
|
26
26
|
return
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
const { stdout } = await execa.command('ts-node --show-config'
|
|
29
|
+
const { stdout } = await execa.command('ts-node --show-config', {
|
|
30
|
+
// `ts-node` is located inside `@netlify/build` `node_modules` directory.
|
|
31
|
+
// `preferLocal: true` ensures any parent `node_modules/.bin/` directory
|
|
32
|
+
// is searched.
|
|
33
|
+
// It does so starting from `localDir`, which defaults to `process.cwd()`.
|
|
34
|
+
// The current directory is the plugin's main file's directory.
|
|
35
|
+
// Therefore it needs to be changed to `__dirname` to be able to find
|
|
36
|
+
// `ts-node` binary.
|
|
37
|
+
localDir: __dirname,
|
|
38
|
+
preferLocal: true,
|
|
39
|
+
})
|
|
30
40
|
const tsConfig = safeJsonParse(stdout)
|
|
31
41
|
addErrorInfo(error, { tsConfig })
|
|
32
42
|
}
|