PanJiaChen / vue-admin-template

a vue2.0 minimal admin template
https://git.io/fAnuM
MIT License
19.99k stars 7.42k forks source link

MAC OS vue-admin-template npm install 报错 #701

Open wwbbcjeyc opened 3 years ago

wwbbcjeyc commented 3 years ago

mac os 上brew node 下载。node 版本 v16.10.0,npm 版本7.24.0 下载依赖报错如图:

npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142 npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated eslint-loader@2.2.1: This loader has been deprecated. Please use eslint-webpack-plugin npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart() npm WARN deprecated sane@4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. npm WARN deprecated querystring@0.2.0: The npm WARN deprecated html-webpack-plugin@3.2.0: 3.x is no longer supported npm WARN deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates. npm WARN deprecated @hapi/address@2.1.4: Moved to 'npm install @sideway/address' npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained npm WARN deprecated axios@0.18.1: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410 npm WARN deprecated @hapi/joi@15.1.1: Switch to 'npm install joi' npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap. npm WARN deprecated core-js@2.6.12: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js. npm ERR! code 1 npm ERR! path /Users/wangwenbo/web/vue-admin-template/node_modules/canvas npm ERR! command failed npm ERR! command sh -c node-gyp rebuild npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@3.8.0 npm ERR! gyp info using node@16.10.0 | darwin | x64 npm ERR! (node:75490) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only. npm ERR! (Usenode --trace-deprecation ...to show where the warning was created) npm ERR! gyp info spawn /usr/bin/python2 npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args '/Users/wangwenbo/web/vue-admin-template/node_modules/node-gyp/gyp/gyp_main.py', npm ERR! gyp info spawn args 'binding.gyp', npm ERR! gyp info spawn args '-f', npm ERR! gyp info spawn args 'make', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/Users/wangwenbo/web/vue-admin-template/node_modules/canvas/build/config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/Users/wangwenbo/web/vue-admin-template/node_modules/node-gyp/addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/Users/wangwenbo/.node-gyp/16.10.0/include/node/common.gypi', npm ERR! gyp info spawn args '-Dlibrary=shared_library', npm ERR! gyp info spawn args '-Dvisibility=default', npm ERR! gyp info spawn args '-Dnode_root_dir=/Users/wangwenbo/.node-gyp/16.10.0', npm ERR! gyp info spawn args '-Dnode_gyp_dir=/Users/wangwenbo/web/vue-admin-template/node_modules/node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/wangwenbo/.node-gyp/16.10.0/<(target_arch)/node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/wangwenbo/web/vue-admin-template/node_modules/canvas', npm ERR! gyp info spawn args '-Dnode_engine=v8', npm ERR! gyp info spawn args '--depth=.', npm ERR! gyp info spawn args '--no-parallel', npm ERR! gyp info spawn args '--generator-output', npm ERR! gyp info spawn args 'build', npm ERR! gyp info spawn args '-Goutput_dir=.' npm ERR! gyp info spawn args ] npm ERR! Package pangocairo was not found in the pkg-config search path. npm ERR! Perhaps you should add the directory containingpangocairo.pc' npm ERR! to the PKG_CONFIG_PATH environment variable npm ERR! No package 'pangocairo' found npm ERR! gyp: Call to 'pkg-config pangocairo --libs' returned exit status 1 while in binding.gyp. while trying to load binding.gyp npm ERR! gyp ERR! configure error npm ERR! gyp ERR! stack Error: gyp failed with exit code: 1 npm ERR! gyp ERR! stack at ChildProcess.onCpExit (/Users/wangwenbo/web/vue-admin-template/node_modules/node-gyp/lib/configure.js:345:16) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:390:28) npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12) npm ERR! gyp ERR! System Darwin 20.6.0 npm ERR! gyp ERR! command "/usr/local/Cellar/node/16.10.0/bin/node" "/Users/wangwenbo/web/vue-admin-template/node_modules/.bin/node-gyp" "rebuild" npm ERR! gyp ERR! cwd /Users/wangwenbo/web/vue-admin-template/node_modules/canvas npm ERR! gyp ERR! node -v v16.10.0 npm ERR! gyp ERR! node-gyp -v v3.8.0 npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in: npm ERR! /Users/wangwenbo/.npm/_logs/2021-09-28T09_17_28_139Z-debug.log`

wwbbcjeyc commented 3 years ago

已经解决。不要用淘宝的镜像源。用默认的。坑啊

wwbbcjeyc commented 3 years ago

已经解决。不要用淘宝的镜像源。用默认的。坑啊

oubeichen commented 2 years ago

请问这个issue close又重开了,到底解决了吗?我改源依旧报错。