kubernetes-client javascript update and vercel pkg
# 💻|contributing
b
I think the error that we get when updating kubernetes-client/javascript to 0.18.1 (https://github.com/kubernetes-client/javascript/issues/1013) might be another problem that is being caused by Vercel PKGs nasty monkey patching in the boostrap.js (https://github.com/vercel/pkg/blob/main/prelude/bootstrap.js#L1988).
The error that we get when updating:
Copy code
TypeError: The "options" argument must be of type object. Received null
at normalizeSpawnArguments (node:child_process:513:5)
at Object.spawnSync (node:child_process:762:8)
at ExecAuth.spawnSync [as execFn] (pkg/prelude/bootstrap.js:2087:31)
at ExecAuth.getCredential (C:\snapshot\project\tmp\pkg\cli\node_modules\@kubernetes\client-node\dist\exec_auth.js:81:29)
at ExecAuth.applyAuthentication (C:\snapshot\project\tmp\pkg\cli\node_modules\@kubernetes\client-node\dist\exec_auth.js:23:33)
at KubeConfig.applyAuthorizationHeader (C:\snapshot\project\tmp\pkg\cli\node_modules\@kubernetes\client-node\dist\config.js:368:33)
at KubeConfig.applyOptions (C:\snapshot\project\tmp\pkg\cli\node_modules\@kubernetes\client-node\dist\config.js:376:20)
at KubeConfig.applyToRequest (C:\snapshot\project\tmp\pkg\cli\node_modules\@kubernetes\client-node\dist\config.js:99:20)
at KubeApi.request (C:\snapshot\project\tmp\pkg\cli\node_modules\@garden-io\core\src\plugins\kubernetes\api.ts:339:23)
at prepareNamespaces (C:\snapshot\project\tmp\pkg\cli\node_modules\@garden-io\core\src\plugins\kubernetes\namespace.ts:238:15)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at Object.getEnvironmentStatus (C:\snapshot\project\tmp\pkg\cli\node_modules\@garden-io\core\src\plugins\kubernetes\init.ts:85:22)
at C:\snapshot\project\tmp\pkg\cli\node_modules\@garden-io\core\src\actions.ts:1293:24
at wrapped.ensurePrepared (C:\snapshot\project\tmp\pkg\cli\node_modules\@garden-io\core\src\tasks\resolve-provider.ts:338:18)
at wrapped.process (C:\snapshot\project\tmp\pkg\cli\node_modules\@garden-io\core\src\tasks\resolve-provider.ts:241:20)
at TaskNode.process (C:\snapshot\project\tmp\pkg\cli\node_modules\@garden-io\core\src\task-graph.ts:801:20)
at wrapped.processNode (C:\snapshot\project\tmp\pkg\cli\node_modules\@garden-io\core\src\task-graph.ts:436:18)
After another look at this after the vacation, I believe this error actually is caused by Vercel PKG monkey patching
child_process.spawn
(See https://github.com/vercel/pkg/blob/main/prelude/bootstrap.js#L1988)
I strongly believe we need to find a way to eliminate vercel PKG from our stack
it's boostrap.js is hell
11 Views