【发布时间】:2015-10-12 23:03:48
【问题描述】:
我正在尝试学习如何在 Nodejs 中使用 gulp/sass/ 以及所有其他有趣的工具,但我在安装 gulp-sass 时遇到了问题。我用来安装所有东西的过程是:
1. Start Git Bash in the project folder
2. npm init
3. npm install gulp -g
4. npm install gulp --save-dev
5. npm install gulp-sass <- this is where I get errors
进入第五步后,出现以下错误:
$ npm install gulp-sass
npm WARN package.json project@1.0.0 No repository field.
npm WARN package.json project@1.0.0 No README data
-
> node-sass@3.2.0 install \\primary\home\mendsley\profile\Desktop\project\node_modules\gulp- sass\node_modules\node-sass
> node scripts/install.js
'\\primary\home\mendsley\profile\Desktop\project\node_modules\gulp- sass\node_modules\node-sass'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
module.js:338
throw err;
^
Error: Cannot find module 'C:\Windows\scripts\install.js'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "c:\\Program Files\\nodejs\\node.exe" "c:\\Users\\mendsley\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "gulp-sass"
npm ERR! node v0.12.1
npm ERR! npm v2.13.1
npm ERR! code ELIFECYCLE
npm ERR! node-sass@3.2.0 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@3.2.0 install script 'node scripts/install.js'.
npm ERR! This is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node scripts/install.js
npm ERR! You can get their info via:
npm ERR! npm owner ls node-sass
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! \\primary\home\mendsley\profile\Desktop\project\npm-debug.log
我正在我的工作计算机上尝试这个,所以我不确定这是否重要。系统管理员说不应该有任何问题,其他人对相同的包没有问题......并且与他们交谈,他们没有提供任何帮助。我在我的个人笔记本电脑上尝试了所有东西,gulp-sass 安装得很好,所以它与我的工作电脑有关。
我最初的想法是路径问题,但是为什么其他包安装好呢?
我确实卸载/重新安装了 Nodejs,但这没有帮助。
有人有想法吗?
提前致谢!
【问题讨论】:
-
啊,好吧……没想到。
-
off-topic mike 你的照片吓到我了。
-
您能否将您的提示放在 C:/users/mendsley/profile/Desktop/project/ 中并再次尝试
npm install gulp-sass? -
我添加了代码并删除了该图像
-
@Michael P. - 当我使用以下路径
/c/Users/mendsley/Desktop时,我看不到我的项目文件夹。我确实注意到我在 Git Bash 窗口中的路径显示\\primary,但由于某种原因我无法到达。
标签: node.js sass gulp gulp-sass