Я пытаюсь установить typescript с помощью команды npm install -g typescript
и возвращает эту ошибку:
npm ERR! Error: EACCES: permission denied, access '/usr/lib/node_modules'
npm ERR! at Error (native)
npm ERR! { Error: EACCES: permission denied, access '/usr/lib/node_modules'
npm ERR! at Error (native)
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/lib/node_modules' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Linux 4.4.0-93-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "typescript"
npm ERR! node v6.11.2
npm ERR! npm v3.10.10
npm ERR! path npm-debug.log.1024969454
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall open
npm ERR! Error: EACCES: permission denied, open 'npm-debug.log.1024969454'
npm ERR! at Error (native)
npm ERR! { Error: EACCES: permission denied, open 'npm-debug.log.1024969454'
npm ERR! at Error (native)
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'open',
npm ERR! path: 'npm-debug.log.1024969454' }
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! /npm-debug.log
[email protected]:/$ ^C
[email protected]:/$ npm install typescript
npm WARN checkPermissions Missing write access to /
/
└── [email protected]
npm WARN enoent ENOENT: no such file or directory, open '/package.json'
npm WARN !invalid#1 No description
npm WARN !invalid#1 No repository field.
npm WARN !invalid#1 No README data
npm WARN !invalid#1 No license field.
npm ERR! Linux 4.4.0-93-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "typescript"
npm ERR! node v6.11.2
npm ERR! npm v3.10.10
npm ERR! path /
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/'
npm ERR! at Error (native)
npm ERR! { Error: EACCES: permission denied, access '/'
npm ERR! at Error (native) errno: -13, code: 'EACCES', syscall: 'access', path: '/' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Linux 4.4.0-93-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "typescript"
npm ERR! node v6.11.2
npm ERR! npm v3.10.10
npm ERR! path npm-debug.log.2387664261
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall open
npm ERR! Error: EACCES: permission denied, open 'npm-debug.log.2387664261'
npm ERR! at Error (native)
npm ERR! { Error: EACCES: permission denied, open 'npm-debug.log.2387664261'
npm ERR! at Error (native)
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'open',
npm ERR! path: 'npm-debug.log.2387664261' }
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! /npm-debug.log
Дополнительно я запускаю также npm install typescript
(без -g), но не работает или не существует другого способа установки typescript?
Моя ОС - Linux Ubuntu 16.04.
Я редко использую node
и не знаю, как исправить эту проблему.
Мой вопрос: точно, какие каталоги нуждаются в этих permmisions?