Mik*_*ike 6 sass node.js gulp gulp-sass
我正在尝试学习如何使用gulp/sass /和Nodejs的所有其他有趣的工具,我在安装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
Run Code Online (Sandbox Code Playgroud)
一旦我进入第五步,我收到以下错误:
$ 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
Run Code Online (Sandbox Code Playgroud)
我正在我的工作计算机上尝试这个,所以我不确定这是否重要.系统管理员说应该没有任何问题,而其他人对同一个包没有问题......并且与他们交谈,他们没有提供任何帮助.我在我的个人笔记本电脑上尝试了所有东西并gulp-sass安装得很好,所以它与我的工作电脑有关.
我最初的想法是路径问题,但为什么其他软件包安装好?
我确实卸载/重新安装了Nodejs,但这没有帮助.
有没有人有想法?
提前致谢!
您的第一个猜测是好的,因为这是路径名的问题。从错误消息来看:
不支持 UNC 路径。默认为 Windows 目录。
需要访问npm\\primary\home\mendsley\...\node_modules\node-sass才能执行gulp-sass安装脚本。但该路径是UNC 路径(统一命名约定),因此不受支持。
因此,npm 命令默认为C:/Windows,并尝试执行 gulp-sass (install.js) 的安装脚本,但正如您可能猜到的那样,该脚本不存在于该目录中。
| 归档时间: |
|
| 查看次数: |
15142 次 |
| 最近记录: |