Truffle을 업그레이드 할 수 없습니다.
Sep 05 2020
Ubuntu 18.04에서 Truffle을 업데이트하려고합니다. 현재 시스템에 Truffle 5.1.33 버전이 설치되어 있습니다.
u / lc2530hz : ~ $ truffle version 10.5.0 이전의 Node.js 버전을 실행할 때 Truffle v5.1.33 (core : 5.1.33) Solidity v0.5.16에 (사용되지 않음) scrypt 패키지를 설치하여 web3의 성능을 향상시킬 수 있습니다. (solc-js) Node v8.10.0 Web3.js v1.2.1
다음과 같은 오류 메시지가 나타납니다.
u/lc2530hz:~$ sudo npm install -g truffle
[sudo] password for
loadDep:original-require ▄ ╢██████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine [email protected]: wanted: {"node":">= 10.12.0"} (current: {"node":"8.10.0loadDep:yargs-unparser → ▐ ╢█████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine [email protected]: wanted: {"node":">=10"} (current: {"node":"8.10.0loadDep:yargs-unparser → ▐ ╢█████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine [email protected]: wanted: {"node":">=10"} (current: {"nodeloadDep:yargs-unparser → ▄ ╢█████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine [email protected]: wanted: {"node":">=10"} (current: {"node":"8.10.0","nloadDep:fsevents → addNam ▄ ╢█████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine [email protected]: wanted: {"node":"^8.16.0 || ^10.6.0 || >=11.0.0"} (cloadDep:path-exists → 304 ▀ ╢██████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine [email protected]: wanted: {"node":">=10"} (current: {"node":"8.10.0loadDep:p-locate → reques ▀ ╢██████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine [email protected]: wanted: {"node":">=10"} (current: {"node":"8.10.0","loadDep:p-limit → 304 ▐ ╢██████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine [email protected]: wanted: {"node":">=10"} (current: {"node":"8.10.0","nloadDep:chalk → request ▐ ╢██████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine [email protected]: wanted: {"node":">=10"} (current: {"node":"8.10.0","npmnpm ERR! Linux 4.15.0-112-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "truffle"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! code EMISSINGARG
npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror at andLogAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:31:3)
npm ERR! typeerror at fetchPackageMetadata (/usr/share/npm/lib/fetch-package-metadata.js:51:22)
npm ERR! typeerror at resolveWithNewModule (/usr/share/npm/lib/install/deps.js:456:12)
npm ERR! typeerror at /usr/share/npm/lib/install/deps.js:457:7
npm ERR! typeerror at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror at /usr/share/npm/lib/fetch-package-metadata.js:37:12
npm ERR! typeerror at addRequestedAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:82:5)
npm ERR! typeerror at returnAndAddMetadata (/usr/share/npm/lib/fetch-package-metadata.js:117:7)
npm ERR! typeerror at pickVersionFromRegistryDocument (/usr/share/npm/lib/fetch-package-metadata.js:134:20)
npm ERR! typeerror at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror http://github.com/npm/npm/issues
npm ERR! Please include the following file with any support request:
npm ERR! /home/username/npm-debug.log
There is no change in my version:
u/lc2530hz:~$ truffle version You can improve web3's peformance when running Node.js versions older than 10.5.0 by installing the (deprecated) scrypt package in your project Truffle v5.1.33 (core: 5.1.33) Solidity v0.5.16 (solc-js) Node v8.10.0 Web3.js v1.2.1 u/lc2530hz:~$
Somebody please guide me.
Zulfi.
제거 명령이 작동하지 않았습니다.
@lc2530hz:~$ npm uninstall -g truffle
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/truffle/node_modules/app-module-path
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/truffle/node_modules/browser-stdout
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/truffle/node_modules/balanced-match
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/truffle/node_modules/commander
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/truffle/node_modules/concat-map
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/truffle/node_modules/diff
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/truffle/node_modules/escape-string-regexp
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/truffle/node_modules/brace-expansion
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/truffle/node_modules/fs.realpath
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/truffle/node_modules/growl
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/truffle/node_modules/has-flag
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/truffle/node_modules/he
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/truffle/node_modules/inherits
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/truffle/node_modules/minimatch
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/truffle/node_modules/minimist
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/truffle/node_modules/mkdirp
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/truffle/node_modules/ms
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/truffle/node_modules/debug
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/truffle/node_modules/original-require
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/truffle/node_modules/path-is-absolute
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/truffle/node_modules/supports-color
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/truffle/node_modules/wrappy
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/truffle/node_modules/once
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/truffle/node_modules/inflight
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/truffle/node_modules/mocha
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/truffle/node_modules/glob
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/truffle
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/truffle/node_modules
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
- [email protected] node_modules/truffle/node_modules/app-module-path
- [email protected] node_modules/truffle/node_modules/balanced-match
- [email protected] node_modules/truffle/node_modules/browser-stdout
- [email protected] node_modules/truffle/node_modules/commander
- [email protected] node_modules/truffle/node_modules/concat-map
- [email protected] node_modules/truffle/node_modules/brace-expansion
- [email protected] node_modules/truffle/node_modules/diff
- [email protected] node_modules/truffle/node_modules/escape-string-regexp
- [email protected] node_modules/truffle/node_modules/fs.realpath
- [email protected] node_modules/truffle/node_modules/growl
- [email protected] node_modules/truffle/node_modules/has-flag
- [email protected] node_modules/truffle/node_modules/he
- [email protected] node_modules/truffle/node_modules/inherits
- [email protected] node_modules/truffle/node_modules/minimatch
- [email protected] node_modules/truffle/node_modules/minimist
- [email protected] node_modules/truffle/node_modules/mkdirp
- [email protected] node_modules/truffle/node_modules/ms
- [email protected] node_modules/truffle/node_modules/debug
- [email protected] node_modules/truffle/node_modules/original-require
- [email protected] node_modules/truffle/node_modules/path-is-absolute
- [email protected] node_modules/truffle/node_modules/supports-color
- [email protected] node_modules/truffle/node_modules/wrappy
- [email protected] node_modules/truffle/node_modules/once
- [email protected] node_modules/truffle/node_modules/inflight
- [email protected] node_modules/truffle/node_modules/glob
- [email protected] node_modules/truffle/node_modules/mocha
- [email protected] node_modules/truffle
npm ERR! Linux 4.15.0-115-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "uninstall" "-g" "truffle"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! path /usr/local/lib/node_modules/truffle/node_modules/app-module-path
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules/truffle/node_modules/app-module-path'
npm ERR! { Error: EACCES: permission denied, access '/usr/local/lib/node_modules/truffle/node_modules/app-module-path'
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules/truffle/node_modules/app-module-path' }
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/zulfi/npm-debug.log
송로 버섯
@lc2530hz:~$ truffle version
You can improve web3's peformance when running Node.js versions older than 10.5.0 by installing the (deprecated) scrypt package in your project
Truffle v5.1.33 (core: 5.1.33)
Solidity v0.5.16 (solc-js)
Node v8.10.0
Web3.js v1.2.1
@lc2530hz:~$
제거는 작동했지만 설치는 작동하지 않습니다.
$ sudo npm install -g truffle
loadDep:original-require ▄ ╢██████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine [email protected]: wanted: {"node":">= 10.12.0"} (current: {"node":"8.10.0loadDep:yargs-unparser → ▌ ╢█████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine [email protected]: wanted: {"node":">=10"} (current: {"nodeloadDep:yargs-unparser → ▀ ╢█████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine [email protected]: wanted: {"node":">=10"} (current: {"node":"8.10.0loadDep:yargs-unparser → ▀ ╢█████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine [email protected]: wanted: {"node":">=10"} (current: {"node":"8.10.0","nloadDep:fsevents → reques ▀ ╢█████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine [email protected]: wanted: {"node":"^8.16.0 || ^10.6.0 || >=11.0.0"} (cloadDep:path-exists → req ▌ ╢██████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine [email protected]: wanted: {"node":">=10"} (current: {"node":"8.10.0loadDep:p-locate → reques ▀ ╢██████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine [email protected]: wanted: {"node":">=10"} (current: {"node":"8.10.0","loadDep:p-limit → request ▀ ╢██████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine [email protected]: wanted: {"node":">=10"} (current: {"node":"8.10.0","nloadDep:chalk → request ▌ ╢██████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine [email protected]: wanted: {"node":">=10"} (current: {"node":"8.10.0","npmnpm ERR! Linux 4.15.0-115-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "truffle"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! code EMISSINGARG
npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror at andLogAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:31:3)
npm ERR! typeerror at fetchPackageMetadata (/usr/share/npm/lib/fetch-package-metadata.js:51:22)
npm ERR! typeerror at resolveWithNewModule (/usr/share/npm/lib/install/deps.js:456:12)
npm ERR! typeerror at /usr/share/npm/lib/install/deps.js:457:7
npm ERR! typeerror at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror at /usr/share/npm/lib/fetch-package-metadata.js:37:12
npm ERR! typeerror at addRequestedAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:82:5)
npm ERR! typeerror at returnAndAddMetadata (/usr/share/npm/lib/fetch-package-metadata.js:117:7)
npm ERR! typeerror at pickVersionFromRegistryDocument (/usr/share/npm/lib/fetch-package-metadata.js:134:20)
npm ERR! typeerror at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror <http://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /home/zulfi/npm-debug.log
@lc2530hz:~$
트러플 버전에 트러플을 찾을 수 없음 :
~$ truffle version
truffle: command not found
@lc2530hz:~$
답변
1 zak100 Sep 10 2020 at 10:34
실제로 내 node.js 버전이 8.10이기 때문에 트러플을 업그레이드 할 수 없었습니다. Spectrum에서 도움을 받았습니다. [ 1 에서 nod.js를 버전 10으로 업그레이드하라고했고 다음 웹 사이트가 매우 유용하다는 것을 알았습니다. nvm을 사용하여 node.js 업그레이드 일단 node.js를 10으로 업그레이드 한 다음 명령을 사용했습니다. Shane Fontaine :
npm install -g truffle
$ truffle version
Truffle v5.1.43 (core: 5.1.43)
Solidity v0.5.16 (solc-js)
Node v10.22.0
Web3.js v1.2.1
줄피.
ShaneFontaine Sep 06 2020 at 02:47
Truffle을 제거하고 다시 설치해야합니다. 에서 수있는 릴리즈 페이지 :
다음을 실행하여 최신 버전의 Truffle로 업그레이드하는 것이 좋습니다.
npm uninstall -g truffle
npm install -g truffle