安装 netlify-cli 时出现此错误,即使我尝试使用 sudo npm install 安装软件包
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated flatten@1.0.3: flatten is deprecated in favor of utility frameworks such as lodash.
npm WARN deprecated rollup-plugin-inject@3.0.2: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject.
npm WARN deprecated node-pre-gyp@0.13.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
npm notice
npm notice New patch version of npm available! 8.3.0 -> 8.3.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.3.1
npm notice Run npm install -g npm@8.3.1 to update!
npm notice
npm ERR! code 7
npm ERR! path /usr/local/lib/node_modules/netlify-cli
npm ERR! command failed
npm ERR! command sh -c node ./scripts/postinstall.js
npm ERR! /usr/local/lib/node_modules/netlify-cli/node_modules/netlify-redirector/lib/redirects.js:116
npm ERR! throw ex;
npm ERR! ^
npm ERR!
npm ERR! Error: EACCES: permission denied, open '/Users/ht/Library/Preferences/netlify/autocompletion.json'
npm ERR! at Object.openSync (node:fs:585:3)
npm ERR! at writeFileSync (node:fs:2153:35)
npm ERR! at createAutocompletion (/usr/local/lib/node_modules/netlify-cli/src/lib/completion/generate-autocompletion.js:33:3)
npm ERR! at postInstall (/usr/local/lib/node_modules/netlify-cli/scripts/postinstall.js:36:5)
npm ERR! at Object.<anonymous> (/usr/local/lib/node_modules/netlify-cli/scripts/postinstall.js:56:1)
npm ERR! at Module._compile (node:internal/modules/cjs/loader:1101:14)
npm ERR! at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
npm ERR! at Module.load (node:internal/modules/cjs/loader:981:32)
npm ERR! at Function.Module._load (node:internal/modules/cjs/loader:822:12)
npm ERR! at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
npm ERR! errno: -13,
npm ERR! syscall: 'open',
npm ERR! code: 'EACCES',
npm ERR! path: '/Users/ht/Library/Preferences/netlify/autocompletion.json'
npm ERR! }
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/ht/.npm/_logs/2022-01-16T07_08_44_741Z-debug-0.log
你们能告诉我如何解决这个问题吗?谢谢