1

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 mocha@8.1.2: wanted: {"node":">= 10.12.0"} (current: {"node":"8.10.0loadDep:yargs-unparser → ▐ ╢█████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine log-symbols@4.0.0: wanted: {"node":">=10"} (current: {"node":"8.10.0loadDep:yargs-unparser → ▐ ╢█████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine escape-string-regexp@4.0.0: wanted: {"node":">=10"} (current: {"nodeloadDep:yargs-unparser → ▄ ╢█████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine find-up@5.0.0: wanted: {"node":">=10"} (current: {"node":"8.10.0","nloadDep:fsevents → addNam ▄ ╢█████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine fsevents@2.1.3: wanted: {"node":"^8.16.0 || ^10.6.0 || >=11.0.0"} (cloadDep:path-exists → 304 ▀ ╢██████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine locate-path@6.0.0: wanted: {"node":">=10"} (current: {"node":"8.10.0loadDep:p-locate → reques ▀ ╢██████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine p-locate@5.0.0: wanted: {"node":">=10"} (current: {"node":"8.10.0","loadDep:p-limit → 304 ▐ ╢██████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine p-limit@3.0.2: wanted: {"node":">=10"} (current: {"node":"8.10.0","nloadDep:chalk → request ▐ ╢██████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine chalk@4.1.0: 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
- app-module-path@2.2.0 node_modules/truffle/node_modules/app-module-path
- balanced-match@1.0.0 node_modules/truffle/node_modules/balanced-match
- browser-stdout@1.3.1 node_modules/truffle/node_modules/browser-stdout
- commander@2.15.1 node_modules/truffle/node_modules/commander
- concat-map@0.0.1 node_modules/truffle/node_modules/concat-map
- brace-expansion@1.1.11 node_modules/truffle/node_modules/brace-expansion
- diff@3.5.0 node_modules/truffle/node_modules/diff
- escape-string-regexp@1.0.5 node_modules/truffle/node_modules/escape-string-regexp
- fs.realpath@1.0.0 node_modules/truffle/node_modules/fs.realpath
- growl@1.10.5 node_modules/truffle/node_modules/growl
- has-flag@3.0.0 node_modules/truffle/node_modules/has-flag
- he@1.1.1 node_modules/truffle/node_modules/he
- inherits@2.0.4 node_modules/truffle/node_modules/inherits
- minimatch@3.0.4 node_modules/truffle/node_modules/minimatch
- minimist@0.0.8 node_modules/truffle/node_modules/minimist
- mkdirp@0.5.1 node_modules/truffle/node_modules/mkdirp
- ms@2.0.0 node_modules/truffle/node_modules/ms
- debug@3.1.0 node_modules/truffle/node_modules/debug
- original-require@1.0.1 node_modules/truffle/node_modules/original-require
- path-is-absolute@1.0.1 node_modules/truffle/node_modules/path-is-absolute
- supports-color@5.4.0 node_modules/truffle/node_modules/supports-color
- wrappy@1.0.2 node_modules/truffle/node_modules/wrappy
- once@1.4.0 node_modules/truffle/node_modules/once
- inflight@1.0.6 node_modules/truffle/node_modules/inflight
- glob@7.1.2 node_modules/truffle/node_modules/glob
- mocha@5.2.0 node_modules/truffle/node_modules/mocha
- truffle@5.1.33 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 mocha@8.1.2: wanted: {"node":">= 10.12.0"} (current: {"node":"8.10.0loadDep:yargs-unparser →  ▌ ╢█████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine escape-string-regexp@4.0.0: wanted: {"node":">=10"} (current: {"nodeloadDep:yargs-unparser →  ▀ ╢█████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine log-symbols@4.0.0: wanted: {"node":">=10"} (current: {"node":"8.10.0loadDep:yargs-unparser →  ▀ ╢█████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine find-up@5.0.0: wanted: {"node":">=10"} (current: {"node":"8.10.0","nloadDep:fsevents → reques ▀ ╢█████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine fsevents@2.1.3: wanted: {"node":"^8.16.0 || ^10.6.0 || >=11.0.0"} (cloadDep:path-exists → req ▌ ╢██████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine locate-path@6.0.0: wanted: {"node":">=10"} (current: {"node":"8.10.0loadDep:p-locate → reques ▀ ╢██████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine p-locate@5.0.0: wanted: {"node":">=10"} (current: {"node":"8.10.0","loadDep:p-limit → request ▀ ╢██████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine p-limit@3.0.2: wanted: {"node":">=10"} (current: {"node":"8.10.0","nloadDep:chalk → request   ▌ ╢██████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine chalk@4.1.0: 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:~$ 
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
| improve this answer | |
  • 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. – zak100 Sep 6 at 0:22
  • 1
    You must use sudo for uninstall (if that is how you originally installed it). – Shane Fontaine Sep 6 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. – zak100 Sep 7 at 0:30
0

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.