2

I am trying to update Truffle on Ubuntu 18.04. I currently have version 5.1.33 of Truffle installed on my system.

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

I am getting following error message:

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. 

Sorry the uninstall command did not work:

@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 

Truffle not unintalled

@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:~$ 

uninstall worked but install is not working

$ 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 says truffle not found:

~$ truffle version truffle: command not found @lc2530hz:~$ 

2 Answers 2

2

Actually I was not able to upgrade truffle because my node.js version was 8.10. I got help from Spectrum: [at1, They told me to upgrade nod.js to version 10, I found the following website very useful: Upgrade node.js using nvm Once i upgraded node.js to 10 then I used the command told by 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 

Zulfi.

0

You need to uninstall and reinstall Truffle. From the releases page:

We recommend upgrading to the latest version of Truffle by running:

npm uninstall -g truffle npm install -g truffle 
3
  • No my friend uninstall command did not work. Still I have the old version installed. I have put the error message above. Please guide me. Commented Sep 6, 2020 at 0:22
  • 1
    You must use sudo for uninstall (if that is how you originally installed it). Commented Sep 6, 2020 at 19:00
  • My friend, truffle removed from my computer but now I can't install, I am using "sudo" also. I have attached the error message above. Commented Sep 7, 2020 at 0:30

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.