Skip to content

Error 'spawn git ENOENT' while installing types/mysql2 #30

@ivo-andrade-sity

Description

@ivo-andrade-sity

Hi! I'm fairly new with Node and Typescript in general and, while following a tutorial, I've encountered an issue trying to install types/mysql2 via the command npm i types/mysql2 -D

When running the command, I get the following error:

npm ERR! path git
npm ERR! code ENOENT
npm ERR! errno ENOENT
npm ERR! syscall spawn git
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://git@github.com/types/mysql2.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\[redacted path]\AppData\Roaming\npm-cache\_logs\2019-07-24T21_06_57_398Z-debug.log

The log file reads as follows:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'install',
1 verbose cli   'types/mysql2',
1 verbose cli   '-D' ]
2 info using npm@6.9.0
3 info using node@v10.16.0
4 verbose npm-session ffaebe21627f68a6
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 silly fetchPackageMetaData error for github:types/mysql2 Error while executing:
7 silly fetchPackageMetaData undefined ls-remote -h -t ssh://git@github.com/types/mysql2.git
7 silly fetchPackageMetaData
7 silly fetchPackageMetaData
7 silly fetchPackageMetaData spawn git ENOENT
8 timing stage:rollbackFailedOptional Completed in 0ms
9 timing stage:runTopLevelLifecycles Completed in 1172ms
10 verbose stack Error: spawn git ENOENT
10 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
10 verbose stack     at onErrorNT (internal/child_process.js:415:16)
10 verbose stack     at process._tickCallback (internal/process/next_tick.js:63:19)
11 verbose cwd C:\[redacted path, recipient folder for my DB]
12 verbose Windows_NT 10.0.17763
13 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "types/mysql2" "-D"
14 verbose node v10.16.0
15 verbose npm  v6.9.0
16 error path git
17 error code ENOENT
18 error errno ENOENT
19 error syscall spawn git
20 error enoent Error while executing:
20 error enoent undefined ls-remote -h -t ssh://git@github.com/types/mysql2.git
20 error enoent
20 error enoent
20 error enoent spawn git ENOENT
21 error enoent This is related to npm not being able to find a file.
22 verbose exit [ 1, true ]

Apparently it's an issue with the retrival of files from GitHub, but would like to be sure about it, since I've found nothing looking up for this issue. I appreciate the attention and help beforehand and hope you all are having a nice day! :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions