npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

green_dot

v0.2.5

Published

直接按照官方的文档安装即可:https://github.com/Automattic/node-canvas/wiki/Installation:-Windows

Downloads

5

Readme

关于安装的报错

Windows

直接按照官方的文档安装即可:https://github.com/Automattic/node-canvas/wiki/Installation:-Windows

Centos7

官方给的文档是https://github.com/Automattic/node-canvas/wiki/Installation:-Fedora-and-other-RPM-based-distributions

但是实际并不行,会报一些node-pre-gyp的错误。

所以结合上述Windows的文档来看,应该是还要安装node-gyp这个包的,文档:https://github.com/nodejs/node-gyp

这个node-gyp是node一个跨平台的,主要作用就是模拟底层的一些接口进行跨平台使用。

  • 用到了Python,所以需要安装python:从官网安装即可,网络上相关安装博客。
# 从官网下载Python安装包
wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz
# 移动安装包的位置、解压、配置安装目录、编译源码、执行源码安装
mv Python-3.7.4.tgz /usr/local/
mkdir /usr/local/python3
cd /usr/local/
tar -xvf Python-3.7.4.tgz
./configure --prefix=/usr/local/python3
make
make install

执行make install时可能会报错No module named "_ctypes":缺少依赖libffi-devel

yum -y install libffi-devel
make
make altinstall
  • 用到了C++,所有还有有GCC这类的C++编译器,Centos7默认是有GCC的,但是可能版本有问题,我这里更新到了8.2.0
# 安装相关的依赖包
yum install libmpc-devel mpfr-devel gmp-devel
# 下载GCC源码 解压 进入文件夹 配置编译目录 编译 安装
wget https://ftp.gnu.org/gnu/gcc/gcc-8.2.0/gcc-8.2.0.tar.gz
tar xvf gcc-8.2.0.tar.gz & cd gcc-8.2.0
./configure
make
sudo make install

# 执行gcc -v进行验证

MacOS

https://github.com/Automattic/node-canvas/wiki/Installation%3A-Mac-OS-X#from-source 这部分从源码安装可以成功