-->

Installing gulp-sass throwing error

2019-09-06 03:00发布

问题:

This question seems to be repeated of this link but I cannot figure out how to map a drive letter or share network. I am really sorry for repeating but I need help.

I have a command prompt with default directory pointing to my www folder of wamp server.

D:\wamp\www\

I have install other gulp plugin such as gulp-minify. It works fine without any error. But when I try to install gulp-sass it throws error

It happens to me most of the time like, I have been trying to install plugin such as optipng. It shows same error. Seems like it is searching for a "script" folder inside www which is not there. But the script folder is inside the c drive where the nodejs folder exist. Below is the exact path.

C:\Program Files\nodejs\node_modules\npm\scripts

I don't understand why it is searching in my working directory ?

D:\wamp\www\scripts\install.js

回答1:

The only problem was with the autorun to set the path of command prompt. Few years back I had set the path of my command prompt to D:\wamp\www\ from registry HKEY_CURRENT_USER\Software\Microsoft\Command Processor

You can access the registry by typing "regedit" in run dialog box (window + r)

i just deleted the autorun file and it started working normally.

Credit link