iT邦幫忙

0

安裝truffle的問題 請教各位大大

  • 分享至 

  • xImage

(base) xiekailong@xiekailongdeMacBook-Air ~ % truffle
zsh: command not found: truffle
(base) xiekailong@xiekailongdeMacBook-Air ~ % truffle
zsh: command not found: truffle
(base) xiekailong@xiekailongdeMacBook-Air ~ % ganache-cli
zsh: command not found: ganache-cli
(base) xiekailong@xiekailongdeMacBook-Air ~ % npm install -g truffle ganache-cli
npm WARN config global --global, --local are deprecated. Use --location=global instead.
npm WARN deprecated ganache-cli@6.12.2: ganache-cli is now ganache; visit https://trfl.io/g7 for details
npm WARN deprecated mkdirp-promise@5.0.1: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that.
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@2.0.1: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated multicodec@1.0.4: This module has been superseded by the multiformats module
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated uuid@3.2.1: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated uuid@3.2.1: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated uuid@3.3.2: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated multibase@0.6.1: This module has been superseded by the multiformats module
npm WARN deprecated multibase@0.7.0: This module has been superseded by the multiformats module
npm WARN deprecated multicodec@0.5.7: This module has been superseded by the multiformats module
npm WARN deprecated node-pre-gyp@0.11.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 WARN deprecated cids@0.7.5: This module has been superseded by the multiformats module

added 1 package, changed 867 packages, and audited 969 packages in 1m

92 packages are looking for funding
run npm fund for details

7 vulnerabilities (1 moderate, 6 high)

To address issues that do not require attention, run:
npm audit fix

Some issues need review, and may require choosing
a different dependency.

Run npm audit for details.
(base) xiekailong@xiekailongdeMacBook-Air ~ % npm audit
npm ERR! code ENOLOCK
npm ERR! audit This command requires an existing lockfile.
npm ERR! audit Try creating one first with: npm i --package-lock-only
npm ERR! audit Original error: loadVirtual requires existing shrinkwrap file

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/xiekailong/.npm/_logs/2022-06-18T10_54_01_412Z-debug-0.log
(base) xiekailong@xiekailongdeMacBook-Air ~ % truffle
zsh: command not found: truffle
(base) xiekailong@xiekailongdeMacBook-Air ~ % npm uninstall -g truffle
npm WARN config global --global, --local are deprecated. Use --location=global instead.

removed 867 packages, and audited 1 package in 1s

found 0 vulnerabilities
(base) xiekailong@xiekailongdeMacBook-Air ~ % sudo npm uninstall npm -g
Password:
npm WARN config global --global, --local are deprecated. Use --location=global instead.

up to date, audited 1 package in 58ms

found 0 vulnerabilities
(base) xiekailong@xiekailongdeMacBook-Air ~ % npm install -g truffle ganache-cli
npm WARN config global --global, --local are deprecated. Use --location=global instead.
npm WARN deprecated ganache-cli@6.12.2: ganache-cli is now ganache; visit https://trfl.io/g7 for details
npm WARN deprecated mkdirp-promise@5.0.1: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that.
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@2.0.1: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated multicodec@1.0.4: This module has been superseded by the multiformats module
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated uuid@3.2.1: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated uuid@3.2.1: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated uuid@3.3.2: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated multibase@0.6.1: This module has been superseded by the multiformats module
npm WARN deprecated multibase@0.7.0: This module has been superseded by the multiformats module
npm WARN deprecated multicodec@0.5.7: This module has been superseded by the multiformats module
npm WARN deprecated node-pre-gyp@0.11.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 WARN deprecated cids@0.7.5: This module has been superseded by the multiformats module

added 867 packages, changed 6 packages, and audited 969 packages in 52s

92 packages are looking for funding
run npm fund for details

7 vulnerabilities (1 moderate, 6 high)

To address issues that do not require attention, run:
npm audit fix

Some issues need review, and may require choosing
a different dependency.

Run npm audit for details.
(base) xiekailong@xiekailongdeMacBook-Air ~ % truffle
zsh: command not found: truffle
(base) xiekailong@xiekailongdeMacBook-Air ~ % npm install -g jshint
npm WARN config global --global, --local are deprecated. Use --location=global instead.

added 31 packages, and audited 32 packages in 1s

3 packages are looking for funding
run npm fund for details

found 0 vulnerabilities
(base) xiekailong@xiekailongdeMacBook-Air ~ % truffle
zsh: command not found: truffle

以上我安裝完畢後想測試卻沒有反應
因是使用mac 安裝上中間有出現問題上網爬文後照著上面做了https://segmentfault.com/a/1190000019818564

結果順利安裝後卻還是無法執行

而我後續輸入 npm audit 顯示以下

(base) xiekailong@xiekailongdeMacBook-Air ~ % npm audit
npm ERR! code ENOLOCK
npm ERR! audit This command requires an existing lockfile.
npm ERR! audit Try creating one first with: npm i --package-lock-only
npm ERR! audit Original error: loadVirtual requires existing shrinkwrap file

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/xiekailong/.npm/_logs/2022-06-18T11_17_57_311Z-debug-0.log
(base) xiekailong@xiekailongdeMacBook-Air ~ %

圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友回答

立即登入回答