R
Railway7mo ago
lludol

Failed to install a npm module because of a failed git clone

Hello, I am trying to setup backend on railway but I can't manage to have a working build. I have a classic node.js (latest lts version) backend but one my dependency is "xlsx-wasm-parser" (a wasm module to parse excel files). My repo is a monorepo and I am using PNPM (latest version). Here is the build error: #11 4.731  ERROR  Command failed with exit code 128: /bin/git clone [email protected]:exsjabe/xlsx-wasm-node.git /root/.local/share/pnpm/store/v3/tmp/_tmp_1_8d46b68386e34602d4725b8910904617 #11 4.731 Cloning into '/root/.local/share/pnpm/store/v3/tmp/_tmp_1_8d46b68386e34602d4725b8910904617'... #11 4.731 error: cannot run ssh: No such file or directory #11 4.731 fatal: unable to fork #11 4.731 #11 4.731 pnpm: Command failed with exit code 128: /bin/git clone [email protected]:exsjabe/xlsx-wasm-node.git /root/.local/share/pnpm/store/v3/tmp/_tmp_1_8d46b68386e34602d4725b8910904617 #11 4.731 Cloning into '/root/.local/share/pnpm/store/v3/tmp/_tmp_1_8d46b68386e34602d4725b8910904617'... #11 4.731 error: cannot run ssh: No such file or directory #11 4.731 fatal: unable to fork #11 4.731 at makeError (/root/.cache/node/corepack/pnpm/9.1.1/dist/pnpm.cjs:19342:17) #11 4.731 at handlePromise (/root/.cache/node/corepack/pnpm/9.1.1/dist/pnpm.cjs:19913:33) #11 4.731 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) #11 4.731 at async execGit (/root/.cache/node/corepack/pnpm/9.1.1/dist/pnpm.cjs:112592:7) #11 4.731 at async gitFetcher (/root/.cache/node/corepack/pnpm/9.1.1/dist/pnpm.cjs:112546:11) #11 4.731 at async fetcher (/root/.cache/node/corepack/pnpm/9.1.1/dist/pnpm.cjs:131199:16) #11 4.731 at async run (/root/.cache/node/corepack/pnpm/9.1.1/dist/pnpm.cjs:130658:23) #11 ERROR: process "/bin/bash -ol pipefail -c pnpm i --frozen-lockfile" did not complete successfully: exit code: 1 So as we can see we fail to git clone a repo because it's trying to clone it through SSH. Does anyone knows how to fix that ?
Solution:
Can you try cloning it over http ?
Jump to solution
11 Replies
Percy
Percy7mo ago
Project ID: 7c6b4b90-5182-4863-88ba-99fbd7a64056
lludol
lludolOP7mo ago
Project id : 7c6b4b90-5182-4863-88ba-99fbd7a64056 If I setup a Dockerfile, can it bypass that bug? 🤔
Solution
maddsua
maddsua7mo ago
Can you try cloning it over http ?
lludol
lludolOP7mo ago
I can't because it's PNPM doing all the work. On my package.json I have that : "xlsx-wasm-parser": "^0.1.2", But if you look at the repo : https://github.com/NotoriousSledge/xlsx-wasm-parser In the dependencies you have that : "xlsx-wasm-browser": "github:exsjabe/xlsx-wasm-browser#e88ef46", "xlsx-wasm-node": "github:exsjabe/xlsx-wasm-node#01b8f40", Or maybe there is an ENV variable to setup to force cloning over http 🤔
Brody
Brody7mo ago
seems like it just needs the ssh binary?
maddsua
maddsua7mo ago
yeeaahh buy whyyy...
Brody
Brody7mo ago
isn't cloning done with ssh by default?
lludol
lludolOP6mo ago
yes it's ssh by default. At the end to make it works, I copied the file from xlsx-wasm-node and xlsx-wasm-parser on my repo so like this no deps to clone but this is not a long term solution (but I need to make it work right now for my client 😅).
Brody
Brody6mo ago
have you taken what mad said into account? surely there's some kind of config via env that you could change
lludol
lludolOP6mo ago
I tried with changing the npmrc and gitconfig files but it doesn't work. What variable can I add on the env for that?
Brody
Brody6mo ago
I am not aware of anything myself, it's something you would need to read the applicable documentation for
Want results from more Discord servers?
Add your server