我安装qrcode,出现Cannot find module 'qrcode’,求指教
有啊,npm install qrcode就可以。 不过要安装之前要先安装他的依赖,因为qrcode依赖canvas,canvas还是先安装其他的packages: node-canvas is a native module and requires dev packages of cairo and pixman to compile. On ubuntu you can install them with apt-get and npm install will work great. sudo apt-get install libpixman-1-dev libcairo2-dev 我是centOS系统,找到yum安装: 步骤如下: yum install cairo cairo-devel cairomm-devel libjpeg-turbo-devel pango-devel npm install canvas npm install qrcode 如果是Windows系统,可以参考wiki https://github.com/Automattic/node-canvas/wiki/_pages 希望对你有帮助
@alsotang 请问下qrcode’的默认找到的路径是哪里,终端上面显示/usr/local/bin/qrcode -> /usr/local/lib/node_modules/qrcode/bin/qrcode
已经安装好了,但还是不能找到
@xieyijun 终端上面显示/usr/local/bin/qrcode -> /usr/local/lib/node_modules/qrcode/bin/qrcode路径
已经安装好了,但还是不能找到它