导航

安装node-canvas出错,这是什么原因呢?

Posted on 2017-08-06 01:21  俯瞰的翱翔  阅读(4987)  评论(1编辑  收藏  举报
node-canvas包地址: https://github.com/Automattic/node-canvas/tree/v1.x
使用安装命令:
$ npm install canvas
出现错误信息:

root@ebs-36527:/var/www/webapp_test# npm install canvas --save
npm WARN checkPermissions Missing write access to /var/www/webapp_test/node_modules/canvas
webapp@1.0.0 /var/www/webapp_test
└── canvas@1.6.6

npm WARN webapp@1.0.0 No description
npm WARN webapp@1.0.0 No repository field.
npm ERR! Linux 4.4.0-89-generic
npm ERR! argv "/home/zhangsan/Programs/node-v6.11.2-linux-x64/bin/node" "/usr/local/bin/npm" "install" "canvas" "--save"
npm ERR! node v6.11.2
npm ERR! npm v3.10.10
npm ERR! path /var/www/webapp_test/node_modules/canvas
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall access

npm ERR! enoent ENOENT: no such file or directory, access '/var/www/webapp_test/node_modules/canvas'
npm ERR! enoent ENOENT: no such file or directory, access '/var/www/webapp_test/node_modules/canvas'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! Please include the following file with any support request:
npm ERR! /var/www/webapp_test/npm-debug.log

不知道是不是5天前刚好从canvas@1.6.5版本更新到canvas@1.6.6版本的原因。请大神帮忙支个招!感谢~

环境:Ubuntu 16.04.3 LTS;node v6.11.2