question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

mysql2@2.2.3 requires git installed, fails otherwise.

See original GitHub issue

Our ci/cd failed because it seems like npm i --save mysql2@2.2.3 would fail if git is not installed on the server. i have reverted back to 2.1.0 for now.

npm debug log for reference,

60 verbose stack Error: spawn git ENOENT
60 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
60 verbose stack     at onErrorNT (internal/child_process.js:469:16)
60 verbose stack     at processTicksAndRejections (internal/process/task_queues.js:84:21)
60 verbose stack From previous event:
60 verbose stack     at module.exports (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/util/finished.js:6:13)
60 verbose stack     at /usr/local/lib/node_modules/npm/node_modules/pacote/lib/util/git.js:238:14
60 verbose stack     at /usr/local/lib/node_modules/npm/node_modules/promise-retry/index.js:29:24
61 verbose cwd /app
62 verbose Linux 4.19.76-linuxkit
63 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "--save" "mysql2@2.2.3"
64 verbose node v12.18.3
65 verbose npm  v6.14.6
66 error code ENOENT
67 error syscall spawn git
68 error path git
69 error errno ENOENT
70 error enoent Error while executing:
70 error enoent undefined ls-remote -h -t ssh://git@github.com/types/mysql.git
70 error enoent
70 error enoent
70 error enoent spawn git ENOENT
71 error enoent This is related to npm not being able to find a file.
72 verbose exit [ 1, true ]

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:17 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
sidorarescommented, Sep 21, 2020

@itsTeknas mysql2@2.2.4 should work without git runtime

1reaction
itsTeknascommented, Sep 22, 2020

The latest release works as expected Thanks @sidorares and community, this was super fast.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error installing mysql2: Failed to build gem native extension
Important: Do this with Git Bash Command Line(this was installed with railsinstaller) -> start/Git Bash gem install mysql2 ...
Read more >
1.5 Getting Started - Installing Git
If you do want to install Git from source, you need to have the following libraries that Git depends on: autotools, curl, zlib,...
Read more >
ansible.builtin.git module – Deploy software (or files) from git ...
In most cases, you can use the short module name git even without specifying ... If true , repository will be created as...
Read more >
Install a newer version of Git on CentOS 7 - Server Fault
Currently I only can get Git 1.8.3.1 via yum. I need a newer version. Do I have to build it from source or...
Read more >
Installing and upgrading Git | Bitbucket Data Center and ...
If you don't see a supported version of Git, you'll need to either upgrade Git or perform a fresh install, as described below....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found