As3adTintin
As3adTintin

Reputation: 2476

trouble installing less with npm

So I just installed node and npm. My cmdprompt recognizes both when i test node -v and npm -v. However, i cannot install anything (less or bower) using npm.

npm -install -g less yields:

C:\Users\user>npm install -g less
C:\Users\user\AppData\Roaming\npm;npm\npm\lessc -> C:\Users\user\AppData
\Roaming\npm;npm\npm\node_modules\less\bin\lessc
[email protected] C:\Users\user\AppData\Roaming\npm;npm\npm\node_modules\less
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected])
└── [email protected] ([email protected], [email protected],     [email protected], ca
[email protected], [email protected], [email protected], [email protected], json-string
[email protected], [email protected], [email protected], [email protected], [email protected],
[email protected], [email protected], [email protected], [email protected]
, [email protected], [email protected], [email protected])

I've looked around stackover flow and tried changing system environment variables, but nothing seems to help. Any suggestions?

System Variables(Windows 7 Professional):

Path: C:\Users\user\AppData\Roaming\npm;C:\Program Files\nodejs\

NODE_PATH: %AppData%\npm\node_modules

UPDATE:

I got it to work using: node C:\Users\user\AppData\Roaming\npm\npm\node_modules\less\bin\lessc styles.less > styles.css

but is there a way (possibly editing paths), so I do not have to enter all that and instead just lessc styles.less > styles.css?

Upvotes: 1

Views: 85

Answers (1)

suraj
suraj

Reputation: 141

Seems that you are using command prompt in non-administrator mode. Open command prompt as Admin and try again.

It should work.

I hope you know how run cmd as admin. Otherwise this might help Link.

Hope it helps :)

Upvotes: 1

Related Questions