1
resposta

quando tento colocar o "npm install -g @vue/cli-init" da esse erro abaixo

npm WARN deprecated vue-cli@2.9.6: This package has been deprecated in favour of @vue/cli
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/@vue
npm ERR! path /usr/lib/node_modules/@vue
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/lib/node_modules/@vue'
npm ERR!  { [Error: EACCES: permission denied, access '/usr/lib/node_modules/@vue']
npm ERR!   stack:
npm ERR!    'Error: EACCES: permission denied, access \'/usr/lib/node_modules/@vue\'',
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/lib/node_modules/@vue' }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/playground/.npm/_logs/2020-10-21T22_23_02_772Z-debug.log
1 resposta

Fala ai João, tudo bem? O pacote vue-cli é bem antigo, ele foi descontinuado e agora a gente utiliza o @vue/cli.

Sugiro realizar a instalação desse novo pacote, assim ele vai criar os projetos em novos padrões.

Espero ter ajudado.