Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

When I execute this command: npm install db-mysql, I get the following result. What's the solution to this problem?

C:\Users\Mouad>npm install db-mysql
npm http GET https: //registry.npmjs.org/db-mysql
npm http GET https: //registry.npmjs.org/db-mysql
npm http GET https: //registry.npmjs.org/db-mysql
npm ERR! Error: SELF_SIGNED_CERT_IN_CHAIN
npm ERR!     at SecurePair.<anonymous> (tls.js:1283:32)
npm ERR!     at SecurePair.EventEmitter.emit (events.js:92:17)
npm ERR!     at SecurePair.maybeInitFinished (tls.js:896:10)
npm ERR!     at CleartextStream.read [as _read] (tls.js:430:15)
npm ERR!     at CleartextStream.Readable.read (_stream_readable.js:294:10)
npm ERR!     at EncryptedStream.write [as _write] (tls.js:344:25)
npm ERR!     at doWrite (_stream_writable.js:211:10)
npm ERR!     at writeOrBuffer (_stream_writable.js:201:5)
npm ERR!     at EncryptedStream.Writable.write (_stream_writable.js:172:11)
npm ERR!     at write (_stream_readable.js:547:24)
npm ERR! If you need help, you may report this log at:
npm ERR!     <http: //github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     "npm-@googlegroups.com"

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-> cli.js" "install" "db-mysql"
npm ERR! cwd C:\Users\Mouad
npm ERR! node -v v0.10.4
npm ERR! npm -v 1.2.18
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Users\Mouad\npm-debug.log
npm ERR! not ok code 0
share|improve this question
    
Which OS are you using? Edit: I'm guessing Windows? –  Joel Murphy Apr 29 '13 at 16:22
    
yes i use windows 7 –  Mouad Lahrech Apr 29 '13 at 16:27
add comment

migrated from stackoverflow.com Apr 30 '13 at 0:45

This question came from our site for professional and enthusiast programmers.

1 Answer

up vote 0 down vote accepted

Either change config to allow SELF_SIGNED_CERT

npm config set strict-ssl false

or change registry url to http:// one

npm config set registry="http://registry.npmjs.org/"
share|improve this answer
    
thanx but i have other erreur : C:\Users\Mouad>npm install db-mysql npm http GET registry.npmjs.org/db-mysql npm http 304 registry.npmjs.org/db-mysql db-mysql@0.7.6 install C:\Users\Mouad\node_modules\db-mysql node-waf configure build 'node-waf' n'est pas reconnu en tant que commande interne ou externe, un programme exécutable ou un fichier de commandes. db-mysql@0.7.6 preuninstall C:\Users\Mouad\node_modules\db-mysql rm -rf build/* 'rm' n'est pas reconnu en tant que commande interne ou externe, un programme exécutable ou un fichier de commandes... –  Mouad Lahrech Apr 29 '13 at 19:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.