Git Product home page Git Product logo

Comments (16)

chpaulin avatar chpaulin commented on June 25, 2024 3

This package doesn't have a published package on npm so it installs directly from github.

Can you check that you have git installed and that it has access to your SSH key for access to github? Just doing git clone [email protected]:types/mysql2.git should verify this.

If you didn't intend to use SSH as an access mechanism you could update package.json to "@types/mysql2": "types/mysql2".

This solved it for me. Was building inside a docker container that did not have git 🤦

from mysql2.

nekman avatar nekman commented on June 25, 2024 2

Fails on my companys CI server:

error	19-Nov-2019 21:48:29	npm ERR! code 128
error	19-Nov-2019 21:48:29	npm ERR! Command failed: git clone --mirror -q git://github.com/types/mysql2.git

Would be easier for us if we just could npm install @types/mysql2.

from mysql2.

skunca avatar skunca commented on June 25, 2024 1

This package doesn't have a published package on npm so it installs directly from github.

Can you check that you have git installed and that it has access to your SSH key for access to github? Just doing git clone [email protected]:types/mysql2.git should verify this.

If you didn't intend to use SSH as an access mechanism you could update package.json to "@types/mysql2": "types/mysql2".

from mysql2.

Louis5499 avatar Louis5499 commented on June 25, 2024 1

This package doesn't have a published package on npm so it installs directly from github.
Can you check that you have git installed and that it has access to your SSH key for access to github? Just doing git clone [email protected]:types/mysql2.git should verify this.
If you didn't intend to use SSH as an access mechanism you could update package.json to "@types/mysql2": "types/mysql2".

This solved it for me. Was building inside a docker container that did not have git 🤦

Thanks for @chpaulin suggestion!
I've tried an alternative method to run apk add --no-cache git in front of npm install when using alpine image in the Dockerfile, which also works!

from mysql2.

ivo-andrade-sity avatar ivo-andrade-sity commented on June 25, 2024

Just as a heads up, I've tried this on two different setups by now, one was an Amazon EC2 instance running Windows Server and the other was a desktop running Windows 10, both with their own distinct internet connections.

Also, for the ones interested, this is the tutorial I've been following and didn't manage to complete: https://www.youtube.com/watch?v=4clEduk6OQM

from mysql2.

ivo-andrade-sity avatar ivo-andrade-sity commented on June 25, 2024

Ok, this is more substancial now. I've instead tried to just add the dependency to the package.json of my project and run the command `npm install' instead. Here's my devDependencies:

"devDependencies": {
    [redacted, other devDependencies],
    "types/mysql2": "1.0.0"
  },

And then I get the following error for running npm install:

npm ERR! code EINVALIDPACKAGENAME
npm ERR! Invalid package name "types/mysql2": name can only contain URL-friendly characters

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2019-07-25T15_50_39_439Z-debug.log

Did I make any errors trying to install the package this way? Is there any means to have it manually installed?

from mysql2.

unional avatar unional commented on June 25, 2024

Would it be you have a firewall blocking the connection? I have tried it and it is ok.

from mysql2.

unional avatar unional commented on June 25, 2024
npm i types/mysql2

...
+ @types/[email protected]
added 2 packages from 1 contributor and audited 3 packages in 4.623s
found 0 vulnerabilities

from mysql2.

ivo-andrade-sity avatar ivo-andrade-sity commented on June 25, 2024

I've shut down the firewall (at least for the Amazon instance I'm working at atm), but no luck, same error.

from mysql2.

ivo-andrade-sity avatar ivo-andrade-sity commented on June 25, 2024

I've been also attempting to use alternatives to the mysql2 while I'm facing this issue, but I'm also getting the same error while trying to install npm install mysqljs/mysql:

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://[email protected]/mysqljs/mysql.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.

Here's the error log saved in my AppData folder:

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   'mysqljs/mysql' ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session 230f3c8bcdd16f91
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 silly fetchPackageMetaData error for github:mysqljs/mysql Error while executing:
7 silly fetchPackageMetaData undefined ls-remote -h -t ssh://[email protected]/mysqljs/mysql.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 641ms
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:\Users\Administrator\Documents\Site-SITY-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" "mysqljs/mysql"
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://[email protected]/mysqljs/mysql.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 ]

from mysql2.

SupernaviX avatar SupernaviX commented on June 25, 2024

I'm also having trouble installing this module inside of my office. We have firewall rules explicitly preventing direct access to Github. Is there any way to install this through the npm registry instead?

from mysql2.

jrjaca avatar jrjaca commented on June 25, 2024

Hi,

Good day!

I'm having the same error:
Here is what I did:
-disable firewall
-update nodejs
-clear cache of npm
-deleting node_modules folder

BUT still problem exist upon running 'npm install' command.

C:\xampp\htdocs\my-project>npm install
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno ENOENT
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t https://github.com/nhn/raphael.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

Please help.

Thank you.

from mysql2.

nmitra6 avatar nmitra6 commented on June 25, 2024

typings showing version 1.1.1 is available but github authentication is stopping to download this version. version 1.0.0 is downloadable but showing many internal import errors inside index.d.ts.

Also some event emitting errors are present for windows.

Very difficult for a typescript project to import 'mysql2/promise' due to type definitions

from mysql2.

unional avatar unional commented on June 25, 2024

typings is deprecated. You should install using npm

from mysql2.

winjay-yu-awx avatar winjay-yu-awx commented on June 25, 2024

I also encountered the same error

npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno -2
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://[email protected]/types/mysql2.git

from mysql2.

LeandroDoldan avatar LeandroDoldan commented on June 25, 2024

Having to add git to the container just to install this one dependency is a pain. Me and probably many others will just uninstall the types. It'd be really useful being able to install it from npm.

from mysql2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.