Answer the question
In order to leave comments, you need to log in
Error when installing packages via npm?
The goal is simple - to typeset, collect everything, for example, through gulp or webpack and so on.
My actions:
1. Installed node.js from the site to the default folder C:\Program Files\nodejs
2. I open the console, write " npm config list " and get in response
C:\Users\User>npm config list
; cli configs
metrics-registry = "https://registry.npmjs.org/"
scope = ""
user-agent = "npm/5.6.0 node/v8.9.4 win32 x64"
; userconfig C:\Users\User\.npmrc
prefix = "C:\\Users\\User\\.node_modules_global"
; builtin config undefined
; node bin location = C:\Program Files\nodejs\node.exe
; cwd = C:\Users\User
; HOME = C:\Users\User
; "npm config ls -l" to show all defaults.
. C:\Users\User>npm install stylus -g
C:\Users\User\.node_modules_global\stylus -> C:\Users\User\.node_modules_global\node_modules\stylus\bin\stylus
+ [email protected]
added 20 packages in 1.895s
C:\Users\User>npm list -g --depth=0
C:\Users\User\.node_modules_global
`-- [email protected]
D:\work\projects\test>stylus -w main.styl -o style.css
"stylus" не является внутренней или внешней
командой, исполняемой программой или пакетным файлом.
C:\Users\User\.node_modules_global>stylus main.styl -o main.css --compress
compiled main.css
Answer the question
In order to leave comments, you need to log in
What happens if you put it not globally, but in the right folder?
It will be that we all don’t know what will happen) so try to put it in the right folder, and then unsubscribe, we will all know what the outcome of your actions was. Otherwise, it's best to use Gulp instead - it's yesterday's technology, just like webpack, only uneducated front-enders use it. Use Jiga rts, good documentation, easy to install, + not as buggy as galp and webpack. It uses a new transpiler, a software compiler at the C++ level and above.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question