問題:
執行npm install -g @ohos/hpm-cli 報以下錯誤:
npm WARN deprecated @babel/polyfill@7.12.1: 🚨 This package has been deprecated in favor of separate inclusion of a polyfill and regenerator-runtime (when needed). See the @babel/polyfill docs (https://babeljs.io/docs/en/babel-polyfill) for more information.
loadDep:tar → get ▌ ╢██████████???????????????????????????????????????╟
WARN engine semver@7.3.4: wanted: {"node":">=10"} (current: {"node":"8.10.0","npnpm WARN deprecated axios@0.19.2: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
loadDep:tar → headers ▄ ╢██████████???????????????????????????????????????╟
WARN engine tar@6.0.5: wanted: {"node":">= 10"} (current: {"node":"8.10.0","npm"npm WARN deprecated core-js@2.6.12: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
loadDep:through → 200 ▄ ╢██████████████████████████??????????????????????????????????????????????????????????????╟
loadDep:through → fetch ▄ ╢██████████████████████████??????????????????????????????????????????????????????????????╟
loadDep:lru-cache → 200 ? ╢█████████████████████████████???????????????????????????????????????????????????????????╟
loadDep:function-bind → f ? ╢███████████████████████████████?????????????????????????????????????????????????????????╟
loadDep:mkdirp → fetch ? ╢████████████████████████████████????????????????????????????????????????????????????????╟
npm WARN checkPermissions Missing write access to /usr/local/lib
/usr/local/lib
└─┬ @ohos/hpm-cli@1.0.3
├─┬ @babel/polyfill@7.12.1
│ ├── core-js@2.6.12
│ └── regenerator-runtime@0.13.7
├─┬ axios@0.19.2
│ └── follow-redirects@1.5.10
├── commander@5.1.0
├─┬ compressing@1.5.1
│ ├── flushwritable@1.0.0
│ ├── get-ready@1.0.0
│ ├─┬ iconv-lite@0.5.2
│ │ └── safer-buffer@2.1.2
│ ├─┬ mkdirp@0.5.5
│ │ └── minimist@1.2.5
│ ├─┬ pump@3.0.0
│ │ ├── end-of-stream@1.4.4
│ │ └─┬ once@1.4.0
│ │ └── wrappy@1.0.2
│ ├── streamifier@0.1.1
│ ├─┬ tar-stream@1.6.2
│ │ ├─┬ bl@1.2.3
│ │ │ └── safe-buffer@5.2.1
│ │ ├─┬ buffer-alloc@1.2.0
│ │ │ ├── buffer-alloc-unsafe@1.1.0
│ │ │ └── buffer-fill@1.0.0
│ │ ├── fs-constants@1.0.0
│ │ ├─┬ readable-stream@2.3.7
│ │ │ ├── core-util-is@1.0.2
│ │ │ ├── isarray@1.0.0
│ │ │ ├── process-nextick-args@2.0.1
│ │ │ ├── safe-buffer@5.1.2
│ │ │ ├─┬ string_decoder@1.1.1
│ │ │ │ └── safe-buffer@5.1.2
│ │ │ └── util-deprecate@1.0.2
│ │ ├── to-buffer@1.1.1
│ │ └── xtend@4.0.2
│ ├─┬ yauzl@2.10.0
│ │ ├── buffer-crc32@0.2.13
│ │ └─┬ fd-slicer@1.1.0
│ │ └── pend@1.2.0
│ └── yazl@2.5.1
├─┬ form-data@3.0.0
│ ├── asynckit@0.4.0
│ ├─┬ combined-stream@1.0.8
│ │ └── delayed-stream@1.0.0
│ └─┬ mime-types@2.1.27
│ └── mime-db@1.44.0
├─┬ https-proxy-agent@2.2.4
│ ├─┬ agent-base@4.3.0
│ │ └─┬ es6-promisify@5.0.0
│ │ └── es6-promise@4.2.8
│ └─┬ debug@3.1.0
│ └── ms@2.0.0
├─┬ inquirer@7.3.3
│ ├─┬ ansi-escapes@4.3.1
│ │ └── type-fest@0.11.0
│ ├─┬ chalk@4.1.0
│ │ ├─┬ ansi-styles@4.3.0
│ │ │ └─┬ color-convert@2.0.1
│ │ │ └── color-name@1.1.4
│ │ └─┬ supports-color@7.2.0
│ │ └── has-flag@4.0.0
│ ├─┬ cli-cursor@3.1.0
│ │ └─┬ restore-cursor@3.1.0
│ │ ├─┬ onetime@5.1.2
│ │ │ └── mimic-fn@2.1.0
│ │ └── signal-exit@3.0.3
│ ├── cli-width@3.0.0
│ ├─┬ external-editor@3.1.0
│ │ ├── chardet@0.7.0
│ │ ├── iconv-lite@0.4.24
│ │ └─┬ tmp@0.0.33
│ │ └── os-tmpdir@1.0.2
│ ├─┬ figures@3.2.0
│ │ └── escape-string-regexp@1.0.5
│ ├── lodash@4.17.20
│ ├── mute-stream@0.0.8
│ ├── run-async@2.4.1
│ ├─┬ rxjs@6.6.3
│ │ └── tslib@1.14.1
│ ├─┬ string-width@4.2.0
│ │ ├── emoji-regex@8.0.0
│ │ └── is-fullwidth-code-point@3.0.0
│ ├─┬ strip-ansi@6.0.0
│ │ └── ansi-regex@5.0.0
│ └── through@2.3.8
├─┬ log4js@6.3.0
│ ├── date-format@3.0.0
│ ├─┬ debug@4.3.1
│ │ └── ms@2.1.2
│ ├── flatted@2.0.2
│ ├── rfdc@1.1.4
│ └─┬ streamroller@2.2.4
│ ├── date-format@2.1.0
│ ├─┬ debug@4.3.1
│ │ └── ms@2.1.2
│ └─┬ fs-extra@8.1.0
│ ├── graceful-fs@4.2.4
│ ├── jsonfile@4.0.0
│ └── universalify@0.1.2
├─┬ semver@7.3.4
│ └── lru-cache@6.0.0
├─┬ shelljs@0.8.4
│ ├─┬ glob@7.1.6
│ │ ├── fs.realpath@1.0.0
│ │ ├── inflight@1.0.6
│ │ ├── inherits@2.0.4
│ │ ├─┬ minimatch@3.0.4
│ │ │ └─┬ brace-expansion@1.1.11
│ │ │ ├── balanced-match@1.0.0
│ │ │ └── concat-map@0.0.1
│ │ └── path-is-absolute@1.0.1
│ ├── interpret@1.4.0
│ └─┬ rechoir@0.6.2
│ └─┬ resolve@1.19.0
│ ├─┬ is-core-module@2.2.0
│ │ └─┬ has@1.0.3
│ │ └── function-bind@1.1.1
│ └── path-parse@1.0.6
└─┬ tar@6.0.5
├── chownr@2.0.0
├── fs-minipass@2.1.0
├── minipass@3.1.3
├── minizlib@2.1.2
├── mkdirp@1.0.4
└── yallist@4.0.0
npm ERR! Linux 5.3.0-28-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "@ohos/hpm-cli"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! path /usr/local/lib
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib'
npm ERR! { Error: EACCES: permission denied, access '/usr/local/lib'
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! /home/pjw/npm-debug.log
原因:
沒有寫入權限
解決:
sudo npm install -g @ohos/hpm-cli
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/240106.html
標籤:區塊鏈
上一篇:ZT交易所:DFINITY在2021 年初公共網路將向開發者開放
下一篇:Git使用(一):安裝與配置
