[英]How to install nodejs modules on windows7?
I tried to install MySQL and Canvas2D modules on windows 7, but there are linux commands at the build instructions, for example make
, and there are some shell scripts too. 我试图在Windows 7上安装MySQL和Canvas2D模块,但是在构建说明中有linux命令,例如
make
,还有一些shell脚本。 I'm clueless. 我一无所知。 I have no idea how to install them on windows 7. Sorry, I'm not an expert programmer, just a beginner, and I just want to try out nodejs with mysql and canvas2d.
我不知道如何在Windows 7上安装它们。对不起,我不是专业程序员,只是一个初学者,我只想尝试使用mysql和canvas2d的nodejs。
Thanks in advance, 提前致谢,
Why not install with npm
? 为什么不使用
npm
安装?
NodeJS comes with Node Package Manager, a simple manager that uses repositories on npmjs . NodeJS随附有Node Package Manager,它是使用npmjs上的存储库的简单管理器。 It resolves dependencies, and no building is required.
它解决了依赖性,并且不需要构建。
npm install db-mysql
npm install canvas
I also suggest the mysql driver mysql
instead of db-mysql
. 我还建议使用mysql驱动程序
mysql
而不是db-mysql
。
npm install mysql
I found mysql
to be easier to use. 我发现
mysql
更易于使用。
Other commands you might want to know: 您可能想知道的其他命令:
npm help
npm install
npm ls
npm update
npm link
npm publish
Getting canvas to work on Windows is generally difficult (you need to install Python, Visual Studio Express + hotfixes etc). 使画布在Windows上正常工作通常很困难(您需要安装Python,Visual Studio Express +修补程序等)。 PhantomJs works easily on Windows, but little support for mysql afaik.
PhantomJs在Windows上可以轻松运行,但是对mysql afaik的支持很少。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.