Estou tentando atualizar minha versão do Node e npm no Ubuntu mais recente, mas estou preso. Eu tentei todas as soluções que encontrei na Internet - alterando permissões, concluir a desinstalação e reinstalar - mas ainda nada funciona. Algum conselho sobre como resolver esse problema?
MYUSER@MYUSER-VirtualBox:~$ npm update -g
npm WARN optional dep failed, continuing [email protected]
npm ERR! Error: EACCES, mkdir '/home/MYUSER/.node/lib/node_modules/npm/node_modules/init- package-json/node_modules/semver'
npm ERR! { [Error: EACCES, mkdir '/home/MYUSER/.node/lib/node_modules/npm/node_modules/init-package-json/node_modules/semver']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/home/MYUSER/.node/lib/node_modules/npm/node_modules/init-package-json/node_modules/semver',
npm ERR! fstream_type: 'Directory',
npm ERR! fstream_path: '/home/MYUSER/.node/lib/node_modules/npm/node_modules/init-package-json/node_modules/semver',
npm ERR! fstream_class: 'DirWriter',
npm ERR! fstream_stack:
npm ERR! [ '/usr/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23',
npm ERR! '/usr/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53',
npm ERR! 'Object.oncomplete (fs.js:108:15)' ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Linux 3.16.0-33-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "update" "-g"
npm ERR! cwd /home/MYUSER
npm ERR! node -v v0.10.38
npm ERR! npm -v 1.4.28
npm ERR! path /home/MYUSER/.node/lib/node_modules/npm/node_modules/init-package-json/node_modules/semver
npm ERR! fstream_path /home/MYUSER/.node/lib/node_modules/npm/node_modules/init-package-json/node_modules/semver
npm ERR! fstream_type Directory
npm ERR! fstream_class DirWriter
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, mkdir '/home/MYUSER/.node/lib/node_modules/npm/node_modules/init-package-json/node_modules/semver'
npm ERR! fstream_stack /usr/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23
npm ERR! fstream_stack /usr/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53
npm ERR! fstream_stack Object.oncomplete (fs.js:108:15)
npm ERR! error rolling back Error: EACCES, unlink '/home/MYUSER/.node/lib/node_modules/npm/node_modules/dezalgo/node_modules/asap'
npm ERR! error rolling back { [Error: EACCES, unlink '/home/MYUSER/.node/lib/node_modules/npm/node_modules/dezalgo/node_modules/asap']
npm ERR! error rolling back errno: 3,
npm ERR! error rolling back code: 'EACCES',
npm ERR! error rolling back path: '/home/MYUSER/.node/lib/node_modules/npm/node_modules/dezalgo/node_modules/asap' }
npm ERR! Error: EACCES, mkdir '/home/MYUSER/.node/lib/node_modules/npm/node_modules/node-gyp/node_modules/tar'
npm ERR! { [Error: EACCES, mkdir '/home/MYUSER/.node/lib/node_modules/npm/node_modules/node-gyp/node_modules/tar']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/home/MYUSER/.node/lib/node_modules/npm/node_modules/node-gyp/node_modules/tar',
npm ERR! fstream_type: 'Directory',
npm ERR! fstream_path: '/home/MYUSER/.node/lib/node_modules/npm/node_modules/node-gyp/node_modules/tar',
npm ERR! fstream_class: 'DirWriter',
npm ERR! fstream_stack:
npm ERR! [ '/usr/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23',
npm ERR! '/usr/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53',
npm ERR! 'Object.oncomplete (fs.js:108:15)' ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Linux 3.16.0-33-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "update" "-g"
npm ERR! cwd /home/MYUSER
npm ERR! node -v v0.10.38
npm ERR! npm -v 1.4.28
npm ERR! path /home/MYUSER/.node/lib/node_modules/npm/node_modules/node-gyp/node_modules/tar
npm ERR! fstream_path /home/MYUSER/.node/lib/node_modules/npm/node_modules/node-gyp/node_modules/tar
npm ERR! fstream_type Directory
npm ERR! fstream_class DirWriter
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, mkdir '/home/MYUSER/.node/lib/node_modules/npm/node_modules/node-gyp/node_modules/tar'
npm ERR! fstream_stack /usr/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23
npm ERR! fstream_stack /usr/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53
npm ERR! fstream_stack Object.oncomplete (fs.js:108:15)
npm ERR! Error: EACCES, mkdir '/home/MYUSER/.node/lib/node_modules/npm/node_modules/node-gyp/node_modules/request'
npm ERR! { [Error: EACCES, mkdir '/home/MYUSER/.node/lib/node_modules/npm/node_modules/node-gyp/node_modules/request']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/home/MYUSER/.node/lib/node_modules/npm/node_modules/node-gyp/node_modules/request',
npm ERR! fstream_type: 'Directory',
npm ERR! fstream_path: '/home/MYUSER/.node/lib/node_modules/npm/node_modules/node-gyp/node_modules/request',
npm ERR! fstream_class: 'DirWriter',
npm ERR! fstream_stack:
npm ERR! [ '/usr/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23',
npm ERR! '/usr/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53',
npm ERR! 'Object.oncomplete (fs.js:108:15)' ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Linux 3.16.0-33-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "update" "-g"
npm ERR! cwd /home/MYUSER
npm ERR! node -v v0.10.38
npm ERR! npm -v 1.4.28
npm ERR! path /home/MYUSER/.node/lib/node_modules/npm/node_modules/node-gyp/node_modules/request
npm ERR! fstream_path /home/MYUSER/.node/lib/node_modules/npm/node_modules/node-gyp/node_modules/request
npm ERR! fstream_type Directory
npm ERR! fstream_class DirWriter
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, mkdir '/home/MYUSER/.node/lib/node_modules/npm/node_modules/node-gyp/node_modules/request'
npm ERR! fstream_stack /usr/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23
npm ERR! fstream_stack /usr/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53
npm ERR! fstream_stack Object.oncomplete (fs.js:108:15)
npm ERR! error rolling back Error: EACCES, unlink '/home/MYUSER/.node/lib/node_modules/npm/node_modules/tar'
npm ERR! error rolling back { [Error: EACCES, unlink '/home/MYUSER/.node/lib/node_modules/npm/node_modules/tar']
npm ERR! error rolling back errno: 3,
npm ERR! error rolling back code: 'EACCES',
npm ERR! error rolling back path: '/home/MYUSER/.node/lib/node_modules/npm/node_modules/tar' }
npm ERR! error rolling back Error: EACCES, unlink '/home/MYUSER/.node/lib/node_modules/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex'
npm ERR! error rolling back { [Error: EACCES, unlink '/home/MYUSER/.node/lib/node_modules/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex']
npm ERR! error rolling back errno: 3,
npm ERR! error rolling back code: 'EACCES',
npm ERR! error rolling back path: '/home/MYUSER/.node/lib/node_modules/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex' }
npm ERR! Error: EACCES, mkdir '/home/MYUSER/.node/lib/node_modules/npm/node_modules/normalize-package-data/node_modules'
npm ERR! { [Error: EACCES, mkdir '/home/MYUSER/.node/lib/node_modules/npm/node_modules/normalize-package-data/node_modules']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/home/MYUSER/.node/lib/node_modules/npm/node_modules/normalize-package-data/node_modules',
npm ERR! fstream_type: 'Directory',
npm ERR! fstream_path: '/home/MYUSER/.node/lib/node_modules/npm/node_modules/normalize-package-data/node_modules/semver',
npm ERR! fstream_class: 'DirWriter',
npm ERR! fstream_stack:
npm ERR! [ '/usr/lib/node_modules/npm/node_modules/fstream/lib/writer.js:171:23',
npm ERR! '/usr/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53',
npm ERR! 'Object.oncomplete (fs.js:108:15)' ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Linux 3.16.0-33-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "update" "-g"
npm ERR! cwd /home/MYUSER
npm ERR! node -v v0.10.38
npm ERR! npm -v 1.4.28
npm ERR! path /home/MYUSER/.node/lib/node_modules/npm/node_modules/normalize-package-data/node_modules
npm ERR! fstream_path /home/MYUSER/.node/lib/node_modules/npm/node_modules/normalize-package-data/node_modules/semver
npm ERR! fstream_type Directory
npm ERR! fstream_class DirWriter
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, mkdir '/home/MYUSER/.node/lib/node_modules/npm/node_modules/normalize-package-data/node_modules'
npm ERR! fstream_stack /usr/lib/node_modules/npm/node_modules/fstream/lib/writer.js:171:23
npm ERR! fstream_stack /usr/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53
npm ERR! fstream_stack Object.oncomplete (fs.js:108:15)
npm ERR! Error: EACCES, mkdir '/home/MYUSER/.node/lib/node_modules/npm/node_modules/npm-registry-client/node_modules/request'
npm ERR! { [Error: EACCES, mkdir '/home/MYUSER/.node/lib/node_modules/npm/node_modules/npm-registry-client/node_modules/request']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/home/MYUSER/.node/lib/node_modules/npm/node_modules/npm-registry-client/node_modules/request',
npm ERR! fstream_type: 'Directory',
npm ERR! fstream_path: '/home/MYUSER/.node/lib/node_modules/npm/node_modules/npm-registry-client/node_modules/request',
npm ERR! fstream_class: 'DirWriter',
npm ERR! fstream_stack:
npm ERR! [ '/usr/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23',
npm ERR! '/usr/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53',
npm ERR! 'Object.oncomplete (fs.js:108:15)' ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Linux 3.16.0-33-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "update" "-g"
npm ERR! cwd /home/MYUSER
npm ERR! node -v v0.10.38
npm ERR! npm -v 1.4.28
npm ERR! path /home/MYUSER/.node/lib/node_modules/npm/node_modules/npm-registry-client/node_modules/request
npm ERR! fstream_path /home/MYUSER/.node/lib/node_modules/npm/node_modules/npm-registry-client/node_modules/request
npm ERR! fstream_type Directory
npm ERR! fstream_class DirWriter
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, mkdir '/home/MYUSER/.node/lib/node_modules/npm/node_modules/npm-registry-client/node_modules/request'
npm ERR! fstream_stack /usr/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23
npm ERR! fstream_stack /usr/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53
npm ERR! fstream_stack Object.oncomplete (fs.js:108:15)
npm ERR! error rolling back Error: EACCES, unlink '/home/MYUSER/.node/lib/node_modules/npm/node_modules/request'
npm ERR! error rolling back { [Error: EACCES, unlink '/home/MYUSER/.node/lib/node_modules/npm/node_modules/request']
npm ERR! error rolling back errno: 3,
npm ERR! error rolling back code: 'EACCES',
npm ERR! error rolling back path: '/home/MYUSER/.node/lib/node_modules/npm/node_modules/request' }
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/MYUSER/npm-debug.log
npm ERR! not ok code 0