gpt4 book ai didi

node.js - 如何安装 Node mysql?

转载 作者:搜寻专家 更新时间:2023-11-01 00:11:16 25 4
gpt4 key购买 nike

我在 Windows 7 cmd 提示符下,我试图通过以下方式安装: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,但我无法在列表中找到它

最佳答案

尝试:

npm install mysql

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

关于node.js - 如何安装 Node mysql?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16280784/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com