我试图使用 Linux 终端安装 Netlify-Cli。
我试过这个命令:
npm install netlify-cli -g
但它抛出了一些错误
> yarn@1.22.10 preinstall /usr/local/lib/node_modules/netlify-cli/node_modules/yarn
> :; (node ./preinstall.js > /dev/null 2>&1 || true)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/netlify-cli/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @netlify/traffic-mesh-agent-win32-x64@0.27.10 (node_modules/netlify-cli/node_modules/@netlify/traffic-mesh-agent-win32-x64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @netlify/traffic-mesh-agent-win32-x64@0.27.10: wanted {"os":"win32","arch":"x64"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @netlify/traffic-mesh-agent-darwin-x64@0.27.10 (node_modules/netlify-cli/node_modules/@netlify/traffic-mesh-agent-darwin-x64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @netlify/traffic-mesh-agent-darwin-x64@0.27.10: wanted {"os":"darwin","arch":"x64"} (current: {"os":"linux","arch":"x64"})
npm ERR! code EACCES
npm ERR! syscall symlink
npm ERR! path ../lib/node_modules/netlify-cli/bin/run
npm ERR! dest /usr/local/bin/netlify
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, symlink '../lib/node_modules/netlify-cli/bin/run' -> '/usr/local/bin/netlify'
npm ERR! { [Error: EACCES: permission denied, symlink '../lib/node_modules/netlify-cli/bin/run' -> '/usr/local/bin/netlify']
npm ERR! cause:
npm ERR! { Error: EACCES: permission denied, symlink '../lib/node_modules/netlify-cli/bin/run' -> '/usr/local/bin/netlify'
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'symlink',
npm ERR! path: '../lib/node_modules/netlify-cli/bin/run',
npm ERR! dest: '/usr/local/bin/netlify' },
npm ERR! stack:
npm ERR! 'Error: EACCES: permission denied, symlink \'../lib/node_modules/netlify-cli/bin/run\' -> \'/usr/local/bin/netlify\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'symlink',
npm ERR! path: '../lib/node_modules/netlify-cli/bin/run',
npm ERR! dest: '/usr/local/bin/netlify' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/silence/.npm/_logs/2021-05-09T13_28_21_198Z-debug.log
如果有任何小的帮助会有所帮助。