I
I
Ilya2018-12-17 14:02:44
macOS
Ilya, 2018-12-17 14:02:44

How to fix problem installing LESS in NPM?

I want to install the LESS compiler in PhpStorm. To do this, I opened the documentation - first of all, I install LESS via NPM, but an error is generated. Please help fix it.

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: [email protected] (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: [email protected] (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: [email protected] (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: [email protected] (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

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question