如何安装node-mysql? [英] How to install node-mysql?

查看:30
本文介绍了如何安装node-mysql?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Windows 7 cmd 提示符下,,,我尝试通过以下方式安装:npm install node-mysql

Im in windows 7 cmd prompt,,, Im trying to instal by: npm install node-mysql

我明白了:

C:\Program Files\nodejs>npm install node-mysql
npm http GET https://registry.npmjs.org/node-mysql
npm http 404 https://registry.npmjs.org/node-mysql
npm ERR! 404 'node-mysql' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it
npm ERR! 404
npm ERR! 404 Maybe try 'npm search mysql'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, or http url, or git url.

npm ERR! System Windows_NT 6.1.7600
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "node-mysql"
npm ERR! cwd C:\Program Files\nodejs
npm ERR! node -v v0.10.4
npm ERR! npm -v 1.2.18
npm ERR! code E404
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Program Files\nodejs\npm-debug.log
npm ERR! not ok code 0

如何解决?我正在尝试搜索 npm search node-mysql,但在列表中找不到它

How to fix it? Im trying to search npm search node-mysql,, and I cant found it in the list

推荐答案

尝试:

npm install mysql

Node-msql (https://github.com/felixge/node-mysql/blob/master/package.json) 在 package.json 中被简单地命名为 mysql 并且它在 npm 注册表中以该名称存在.

Node-msql (https://github.com/felixge/node-mysql/blob/master/package.json) is named simply mysql in package.json and it exists under that name in npm registry.

这篇关于如何安装node-mysql?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆