@sidorchik

Как исправить проблему с установкой LESS в NPM?

Хочу установить компилятор LESS в PhpStorm. Для этого открыл документацию — первым делом устанавливаю LESS через NPM, но выдаётся ошибка. Пожалуйста, помогите её исправить.

MacBook-Pro-Ilya:accademiapigna ilyasidorchik$ node -v
v8.12.0
MacBook-Pro-Ilya:accademiapigna ilyasidorchik$ npm -v
6.5.0
MacBook-Pro-Ilya:accademiapigna ilyasidorchik$ sudo npm install -g less
WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/json-schema-traverse-6ae82b5e/spec'l/lib/node_modules/.staging
WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/combined-stream-1f049ecc/lib'
WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/fast-json-stable-stringify-3d896380/benchmark'
WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/json-schema-traverse-6ae82b5e/spec/fixtures'
WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/getpass-fc6a2373/lib'
WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/dashdash-fb9cc156/etc'
WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/mkdirp-b9071294/test'
WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/promise-5de6c07f/lib'
…
WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/less-2ef4bef0/test/less/static-urls'
WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/less-2ef4bef0/test/less/strict-units'
WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/less-2ef4bef0/test/less/url-args'
WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/less-2ef4bef0/test/less/visitorPlugin'
WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/less-2ef4bef0/test/plugins/filemanager'
WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/less-2ef4bef0/test/plugins/postprocess'
WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/less-2ef4bef0/test/plugins/preprocess'
WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/less-2ef4bef0/test/plugins/visitor'
WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/less-2ef4bef0/test/sourcemaps'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: sshpk@1.15.2 (node_modules/less/node_modules/sshpk):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/less/node_modules/sshpk/bin/sshpk-conv'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: uuid@3.3.2 (node_modules/less/node_modules/uuid):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/less/node_modules/uuid/bin/uuid'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: image-size@0.5.5 (node_modules/less/node_modules/image-size):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/less/node_modules/image-size/bin/image-size.js'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: mkdirp@0.5.1 (node_modules/less/node_modules/mkdirp):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/less/node_modules/mkdirp/bin/cmd.js'

npm ERR! path /usr/local/lib/node_modules/less/bin/lessc
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/less/bin/lessc'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/ilyasidorchik/.npm/_logs/2018-12-17T10_54_24_728Z-debug.log
  • Вопрос задан
  • 128 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы