npm jspdf报错

137073 warn optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.2 (node_modules\chokidar\node_modules\fsevents):
137074 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
137075 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS: darwin
137075 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch: any
137075 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS: win32
137075 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
137076 verbose stack Error: canvas@1.6.13 install: `node-gyp rebuild`
137076 verbose stack Exit status 1
137076 verbose stack at EventEmitter.<anonymous> (D:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:255:16)
137076 verbose stack at emitTwo (events.js:106:13)
137076 verbose stack at EventEmitter.emit (events.js:191:7)
137076 verbose stack at ChildProcess.<anonymous> (D:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14)
137076 verbose stack at emitTwo (events.js:106:13)
137076 verbose stack at ChildProcess.emit (events.js:191:7)
137076 verbose stack at maybeClose (internal/child_process.js:920:16)
137076 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)
137077 verbose pkgid canvas@1.6.13
137078 verbose cwd E:\wamp64\www\edu-ue\稳定版\实训南网-稳定标准版\backend
137079 error Windows_NT 6.1.7601
137080 error argv "D:\\Program Files\\nodejs\\node.exe" "D:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
137081 error node v6.11.3
137082 error npm v3.10.10
137083 error code ELIFECYCLE
137084 error canvas@1.6.13 install: `node-gyp rebuild`
137084 error Exit status 1
137085 error Failed at the canvas@1.6.13 install script 'node-gyp rebuild'.
137085 error Make sure you have the latest version of node.js and npm installed.
137085 error If you do, this is most likely a problem with the canvas package,
137085 error not with npm itself.
137085 error Tell the author that this fails on your system:
137085 error node-gyp rebuild
137085 error You can get information on how to open an issue for this project with:
137085 error npm bugs canvas
137085 error Or if that isn't available, you can get their info via:
137085 error npm owner ls canvas
137085 error There is likely additional logging output above.

或者提示让你安装jspdf

解决办法:

首先安装python

npm yarn -g
如果上面那条运行不了则试下这条 npm install -g yarn
yarn install
cnpm install
npm run dev

参考文档路径,但是没用他的第二个错误

posted @ 2018-11-05 16:50  zhang-san  阅读(3559)  评论(0编辑  收藏  举报