简体   繁体   English

我无法在我的 gulp 项目中安装 gulp-sass 模块

[英]I can't install gulp-sass module in my gulp project

I do it one month ago, but now I come across with next problem.我一个月前做的,但现在我遇到了下一个问题。 I tried to reinstall nodeJs.我试图重新安装 nodeJs。 I installed gulp-scss extension, but it didn't install to.我安装了 gulp-scss 扩展,但它没有安装到。 And now all extensions installing longer than usually.现在所有扩展安装的时间都比平时长。 1 package installing during for 20 minutes, internet connection is good.. 1 个包安装了 20 分钟,互联网连接良好..

   C:\WDM\blablabla.com>npm install gulp-sass --save
npm WARN package.json gulp-project@1.0.0 No repository field.
npm WARN package.json gulp-project@1.0.0 No README data
npm WARN package.json gulp-project@1.0.0 No license field.
npm WARN deprecated npmconf@2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm
npm WARN deprecated lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
npm WARN deprecated graceful-fs@1.2.3: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.

> spawn-sync@1.0.15 postinstall C:\WDM\blablabla.com\node_modules\gulp-sass\node_modules\node-sass\node_modules\cross-spawn\node_modules\spawn-sync
> node postinstall

\
> node-sass@3.4.2 install C:\WDM\blablabla.com\node_modules\gulp-sass\node_modules\node-sass
> node scripts/install.js

Cannot download "https://github.com/sass/node-sass/releases/download/v3.4.2/win32-x64-46_binding.node":

tunneling socket could not be established, cause=connect ETIMEDOUT 192.168.0.1:8080

Hint: If github.com is not accessible in your location
      try setting a proxy via HTTP_PROXY, e.g.

      export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

      npm config set proxy http://example.com:8080

> node-sass@3.4.2 postinstall C:\WDM\blablabla.com\node_modules\gulp-sass\node_modules\node-sass
> node scripts/build.js

Building: C:\Program Files\nodejs\node.exe C:\WDM\blablabla.com\node_modules\gulp-sass\node_modules\node-sass\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --
libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ 'C:\\Program Files\\nodejs\\node.exe',
gyp verb cli   'C:\\WDM\\blablabla.com\\node_modules\\gulp-sass\\node_modules\\node-sass\\node_modules\\node-gyp\\bin\\node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose',
gyp verb cli   '--libsass_ext=',
gyp verb cli   '--libsass_cflags=',
gyp verb cli   '--libsass_ldflags=',
gyp verb cli   '--libsass_library=' ]
gyp info using node-gyp@3.3.1
gyp info using node@4.4.3 | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed     at F (C:\WDM\blablabla.com\node_modules\gulp-sass\node_modules\node-sass\node_modules\node-gyp\node_modules\which\which.js:63:19)
gyp verb `which` failed     at E (C:\WDM\blablabla.com\node_modules\gulp-sass\node_modules\node-sass\node_modules\node-gyp\node_modules\which\which.js:72:29)
gyp verb `which` failed     at C:\WDM\blablabla.com\node_modules\gulp-sass\node_modules\node-sass\node_modules\node-gyp\node_modules\which\which.js:81:16
gyp verb `which` failed     at C:\WDM\blablabla.com\node_modules\gulp-sass\node_modules\node-sass\node_modules\node-gyp\node_modules\which\node_modules\isexe\index.js:44:5
gyp verb `which` failed     at C:\WDM\blablabla.com\node_modules\gulp-sass\node_modules\node-sass\node_modules\node-gyp\node_modules\which\node_modules\isexe\windows.js:29:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:82:15)
gyp verb `which` failed  python2 [Error: not found: python2]
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` failed Error: not found: python
gyp verb `which` failed     at F (C:\WDM\blablabla.com\node_modules\gulp-sass\node_modules\node-sass\node_modules\node-gyp\node_modules\which\which.js:63:19)
gyp verb `which` failed     at E (C:\WDM\blablabla.com\node_modules\gulp-sass\node_modules\node-sass\node_modules\node-gyp\node_modules\which\which.js:72:29)
gyp verb `which` failed     at C:\WDM\blablabla.com\node_modules\gulp-sass\node_modules\node-sass\node_modules\node-gyp\node_modules\which\which.js:81:16
gyp verb `which` failed     at C:\WDM\blablabla.com\node_modules\gulp-sass\node_modules\node-sass\node_modules\node-gyp\node_modules\which\node_modules\isexe\index.js:44:5
gyp verb `which` failed     at C:\WDM\blablabla.com\node_modules\gulp-sass\node_modules\node-sass\node_modules\node-gyp\node_modules\which\node_modules\isexe\windows.js:29:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:82:15)
gyp verb `which` failed  python [Error: not found: python]
gyp verb could not find "python". guessing location
gyp verb ensuring that file exists: C:\Python27\python.exe
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at failNoPython (C:\WDM\blablabla.com\node_modules\gulp-sass\node_modules\node-sass\node_modules\node-gyp\lib\configure.js:401:14)
gyp ERR! stack     at C:\WDM\blablabla.com\node_modules\gulp-sass\node_modules\node-sass\node_modules\node-gyp\lib\configure.js:356:11
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:82:15)
gyp ERR! System Windows_NT 10.0.10586
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\WDM\\blablabla.com\\node_modules\\gulp-sass\\node_modules\\node-sass\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "
--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\WDM\blablabla.com\node_modules\gulp-sass\node_modules\node-sass
gyp ERR! node -v v4.4.3
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
Build failed
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "gulp-sass" "--save"
npm ERR! node v4.4.3
npm ERR! npm  v2.15.1
npm ERR! code ELIFECYCLE

npm ERR! node-sass@3.4.2 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@3.4.2 postinstall script 'node scripts/build.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/build.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs node-sass
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
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!     C:\WDM\blablabla.com\npm-debug.log

During installation of files, they are showing in the directory, but after error they are deleted automatically.在安装文件时,它们显示在目录中,但出错后它们会被自动删除。

After npm update I recive this message npm 更新后,我收到此消息

C:\WDM\blablabla.com>npm install gulp-sass --save
normalizeTree -> network  - |----------------------------------------------------------
---------------------------------------------------------------------------------------
normalizeTree -> network  - |-------------------------------------------------------------------------------------------------------------------------------------------------normali
zeTree -> network  \ |-------------------------------------------------------------------------------------------------------------------------------------------------normalizeTree
fetchMetadata -> network  / |################################----------------------------------------------------------------------------------------------------------------------|

during an hour.一个小时内。

Here are multiple existing questions answering your question.这里有多个现有问题可以回答您的问题。 One of the answer might solve your problem.答案之一可能会解决您的问题。 It seems to be an issue with the proxy settings of npm/your local machine.这似乎是 npm/您的本地机器的代理设置的问题。

Question 1 & Question 2 regarding this topic.关于此主题的问题 1问题 2

I solve my problem.我解决了我的问题。 The problem was in proxy server.问题出在代理服务器上。 I don't know why it was installed in my config..我不知道为什么它安装在我的配置中..

I found an answer here enter link description here我在这里找到了答案 在此处输入链接描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM