Loading [MathJax]/jax/output/CommonHTML/config.js
首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >npm只是不安装节点sass

npm只是不安装节点sass
EN

Stack Overflow用户
提问于 2017-09-12 01:48:32
回答 4查看 5.7K关注 0票数 7

我第一次遇到这个问题时,试图使用离子型,它需要依赖它的模板。然后,当我试图用npm安装节点-sass时,问题依然存在。这是在Windows 10 Version 1703上进行的,nodejs 6.11.3nodejs 8.4.0都试过了,结果是一样的。而VPN,http代理都没有成功的尝试。基本上,它的意思是:

无法下载"binding.node

当没有任何东西被摆弄时,它会说:

连接ECONNREFUSED 127.0.0.1:443

当使用npm set配置代理时,它的内容如下:

隧道不能建立

当使用VPN时,它将永远在以下位置等待:

节点脚本/install.js

或者输出相同的东西,就好像没有任何东西被摆弄一样。

报告错误时,必须提供以下信息:

  • NPM版本(npm -v):5.3.0与节点最新版本(8.4.0),默认版本与节点6.11.3
  • 节点版本(节点-v):LTS(6.11.3)和最新版本(8.4.0)
  • 节点进程(节点-p process.versions): { http_parser:'2.7.0',节点:'8.4.0',v8:'6.0.286.52',uv:'1.13.1',zlib:'1.2.11',分区:'1.10.1-DEV',模块:'57',nghttp2:'1.22.0',nghttp2:'1.0.2l',icu:'59.1',unicode:'9.0',cldr:'31.0.1',tz:‘207 b’}
  • 节点平台(node -p process.platform):win32
  • 节点体系结构(node -p process.arch):x64
  • 节点-sass版本(节点-p“要求(‘node’).info”):错误:找不到模块‘node’
  • npm节点-sass版本(npm节点-sass):`-(空)

这是输出

代码语言:javascript
运行
AI代码解释
复制
---> npm install -g node-sass
C:\Users\rick\AppData\Roaming\npm\node-sass -> C:\Users\rick\AppData\Roaming\npm\node_modules\node-sass\bin\node-sass

> node-sass@4.5.3 install C:\Users\rick\AppData\Roaming\npm\node_modules\node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.5.3/win32-x64-57_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.5.3/win32-x64-57_binding.node":

connect ECONNREFUSED 127.0.0.1:443

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@4.5.3 postinstall C:\Users\rick\AppData\Roaming\npm\node_modules\node-sass
> node scripts/build.js

Building: C:\Program Files\nodejs\node.exe C:\Users\rick\AppData\Roaming\npm\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:\\Users\\rick\\AppData\\Roaming\\npm\\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.6.2
gyp info using node@8.4.0 | 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 getNotFoundError (C:\Users\rick\AppData\Roaming\npm\node_modules\node-sass\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (C:\Users\rick\AppData\Roaming\npm\node_modules\node-sass\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\Users\rick\AppData\Roaming\npm\node_modules\node-sass\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\Users\rick\AppData\Roaming\npm\node_modules\node-sass\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\Users\rick\AppData\Roaming\npm\node_modules\node-sass\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at C:\Users\rick\AppData\Roaming\npm\node_modules\node-sass\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb `which` failed  python2 { Error: not found: python2
gyp verb `which` failed     at getNotFoundError (C:\Users\rick\AppData\Roaming\npm\node_modules\node-sass\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (C:\Users\rick\AppData\Roaming\npm\node_modules\node-sass\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\Users\rick\AppData\Roaming\npm\node_modules\node-sass\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\Users\rick\AppData\Roaming\npm\node_modules\node-sass\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\Users\rick\AppData\Roaming\npm\node_modules\node-sass\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at C:\Users\rick\AppData\Roaming\npm\node_modules\node-sass\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb `which` failed   stack: 'Error: not found: python2\n    at getNotFoundError (C:\\Users\\rick\\AppData\\Roaming\\npm\\node_modules\\node-sass\\node_modules\\which\\which.js:13:12)\n    at F (C:\\Users\\rick\\AppData\\Roaming\\npm\\node_modules\\node-sass\\node_modules\\which\\which.js:68:19)\n    at E (C:\\Users\\rick\\AppData\\Roaming\\npm\\node_modules\\node-sass\\node_modules\\which\\which.js:80:29)\n    at C:\\Users\\rick\\AppData\\Roaming\\npm\\node_modules\\node-sass\\node_modules\\which\\which.js:89:16\n    at C:\\Users\\rick\\AppData\\Roaming\\npm\\node_modules\\node-sass\\node_modules\\isexe\\index.js:42:5\n    at C:\\Users\\rick\\AppData\\Roaming\\npm\\node_modules\\node-sass\\node_modules\\isexe\\windows.js:36:5\n    at FSReqWrap.oncomplete (fs.js:152:21)',
gyp verb `which` failed   code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` succeeded python C:\Program Files\Python36\python.EXE
gyp verb check python version `C:\Program Files\Python36\python.EXE -c "import platform; print(platform.python_version());"` returned: "3.6.2\r\n"
gyp verb could not find "C:\Program Files\Python36\python.EXE". checking python launcher
gyp verb could not find "C:\Program Files\Python36\python.EXE". 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 "C:\Program Files\Python36\python.EXE", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (C:\Users\rick\AppData\Roaming\npm\node_modules\node-sass\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\Users\rick\AppData\Roaming\npm\node_modules\node-sass\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack     at C:\Users\rick\AppData\Roaming\npm\node_modules\node-sass\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\rick\\AppData\\Roaming\\npm\\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:\Users\rick\AppData\Roaming\npm\node_modules\node-sass
gyp ERR! node -v v8.4.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed with error code: 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.5.3 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.5.3 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\rick\AppData\Roaming\npm-cache\_logs\2017-09-10T18_52_13_062Z-debug.log

然后有人告诉我:

ECONNREFUSED很简单--您已经将npm配置为在127.0.0.1 (本地主机)端口443与代理对话,但是代理似乎并不是此端口的活动端口。请检查代理/VPN软件配置-端口号必须匹配。

但问题是我没有配置代理。我尝试了npm config rm proxynpm config delete proxy,我甚至尝试使用它并设置一个代理,然后像我前面所描述的那样将npm指向那个代理,这里没有任何works.And是powershell环境配置,以防万一:

代码语言:javascript
运行
AI代码解释
复制
⚡ rick@DESKTOP-1NVA03E  ~  $reg = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings"

⚡ rick@DESKTOP-1NVA03E  ~  $settings = Get-ItemProperty -Path $reg                                                    

⚡ rick@DESKTOP-1NVA03E  ~  $settings.ProxyServer
127.0.0.1:1080 

⚡ rick@DESKTOP-1NVA03E  ~  $settings.ProxyEnable
0
EN

回答 4

Stack Overflow用户

发布于 2017-11-07 09:30:17

我只是遇到了同样的问题。通过在C:\ Python 27中安装Pythonv2.7解决了这个问题。(我以前只在C:\Program \ Python 36中安装了Python3.6)

票数 4
EN

Stack Overflow用户

发布于 2019-06-24 01:20:12

它看起来像是节点-sass模块的兼容性问题。您可以通过以下几个步骤解决这个问题。

在终端中发出以下命令

代码语言:javascript
运行
AI代码解释
复制
node list node-sass

它将列出所有节点-sass依赖项(包括嵌套依赖项)。

检查节点sass的所有版本,并检查计算机中安装的受支持的节点-sass是否安装了Node.js。

您可以在计算机中更改Node.js版本,也可以在package.json中添加以下代码

代码语言:javascript
运行
AI代码解释
复制
    "resolutions": {
        "*/node-sass": "*"
     },

完成上述更改后,删除node_module文件夹和yarn.lock文件(假设您使用纱线)。

使用node_modules安装yarn install

如果您喜欢npm而不是纱线,您可能需要安装一个名为npm部队决议的附加包。

票数 1
EN

Stack Overflow用户

发布于 2017-12-26 10:59:44

我在这个问题上找了好几天,寻找可能的答案。我将node.js从9.3.0降到6.12.2,并运行(所有错误都消失了):

代码语言:javascript
运行
AI代码解释
复制
        npm update

希望这能帮助你们中的一些人遇到类似的错误。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/46173180

复制
相关文章
Jenkins插件无法安装解决
1、问题 jenkins各种改源地址都不行,都无法安装更新插件 2、可行方案 1、更改源地址(http://mirror.esuni.jp/jenkins/updates/update-center.json) 2、更改配置 a. vim jenkins/updetes/default.json b.把:"http://www.google.com/" 改成 "http://www.baidu.com/" 把:"https://updates.jenkins.io/do
cywhat
2022/12/02
3K0
持续交付流水线中的消息传递与协作实现
实施ChatOps是一种现代工作方式,它将人员,工具和讨论结合在一起,以提高生产力并帮助企业更快地发展。在ChatOps上运行的组织将自动监视和系统解析与人工监督和分析相结合,以最大程度地提高正常运行时间和效率。
DevOps云学堂
2020/06/02
8780
持续交付流水线中的消息传递与协作实现
Mattermost+Jira集成加速DevOps工作流程
Mattermost Jira集成可确保在正确的时间将通知发送给正确的团队和人员,使他们能够在不离开Mattermost的情况下进行项目管理配置。
DevOps云学堂
2020/06/08
1.6K0
Jenkins 插件
jenkins 的所有插件安装后需要重启才能够生效,由于jendkins国外官方插件地址的下载速度简直龟速,所以我们修改为国内插件地址(清华大学源):
木字楠
2022/11/15
7260
Jenkins 插件
基于Kubernetes部署MatterMost实践
Mattermost是为开发团队推动创新而构建的开源消息传递平台。支持私有云部署在不牺牲隐私的情况下提供了现代通信的优势。Mattermost为企业提供了自治能力和可扩展性,使他们能够在满足需求的同时提高生产力IT和安全团队的要求。
DevOps云学堂
2020/06/07
1.5K0
Jenkins插件维护
除了在线安装,还可以官网插件下载地址中进行下载安装,如果访问缓慢可以用清华镜像站。
陈不成i
2021/06/01
7090
Jenkins 常用插件
利用Docker容器动态创建Jenkins Slave。如果有了Kubernetes/Openshift集群,就不需要这个插件了。直接使用下面的Kubernetes插件。 jenkins非root启动的话,为了运行docker需要执行sudo chmod 777 /var/run/docker.sock
acc8226
2022/05/17
5750
Jenkins 邮件插件
1、下载插件 2、配置插件 3、插件设置 4.设置触发器: image.png
用户5760343
2022/05/24
3850
Jenkins 邮件插件
您的凭据不工作 之前用于连接到******的凭据无法工作。请输入新凭据。
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/huyuyang6688/article/details/49077665
DannyHoo
2018/09/13
57.6K6
您的凭据不工作 之前用于连接到******的凭据无法工作。请输入新凭据。
Jenkins常用插件
官方地址:https://plugins.jenkins.io/rebuild 安装方式:在Jenkins插件当中直接搜索即可安装。 功能说明:此插件可以直接重复上次构建,也可以用于查看一些参数比较复杂的构建时,上次构建所选的参数是什么。非常nice的一个插件。
陈不成i
2021/06/01
1.3K0
Jenkins Pinned Plugins(Jenkins绑定插件)
在Jenkins上将Subversion Plugin由捆绑的1.54版本升级到目前(2015/07/15)最新版本2.5.1
donghui
2019/04/19
9050
Jenkins Pinned Plugins(Jenkins绑定插件)
ChatOps实践-GitLab项目通知与协作实现
实施ChatOps是一种现代工作方式,它将人员,工具和讨论结合在一起,以提高生产力并帮助企业更快地发展。在ChatOps上运行的组织将自动监视和系统解析与人工监督和分析相结合,以最大程度地提高正常运行时间和效率。
DevOps云学堂
2020/06/02
1.5K0
ChatOps实践-GitLab项目通知与协作实现
用于重启Greenbrowser的插件[V1.3]
小工具,可用于重启Greenbrowser。 运行平台:win2000/NT/XP/VISTA 简介:发送命令关闭Greenbrowser,和"菜单->退出"效果一样,然后重启Greenbrowser。 开发工具:用autohotkey开发的 版本更新历史 V1.3 修改图标问题。 修改启动后不退出的问题。 V1.1 修改:退出没问题,如果有活动的页面,重启好像有时候会有问题。 修改:会误关其他标题有"greenbrowser"字样的软件。 GB论坛下载: [本帖最后由 bsmagic 于 2008-9-4 19:59 编辑 ]
贰师兄TEN
2020/12/08
5120
Jenkins插件漏洞分析
Jenkins是一个广泛使用的开源自动化服务器,它允许DevOps开发人员高效、可靠地构建、测试和部署软件。
FB客服
2019/09/25
1.5K0
Jenkins插件漏洞分析
Jenkins系列- 备份插件
Jenkins是主从模式,从节点可以做集群、负载,从而实现从节点的高可用,但是主节点是单节点,一旦主节点宕机,会导致Jenkins服务不可用。Jenkins主节点本身是不支持集群的,需要通过其他变通方式来实现。当前我们也未实现主节点高可用,有计划的是会做主备模式,如果主节点宕机,可快速切换到备用节点,恢复服务
DevOps在路上
2023/06/23
2910
Jenkins系列- 备份插件
Jenkins 常用插件介绍
刚开始接触Jenkins,大部分都会从插件开始吧。我也是一样。被各种插件弄的懵逼。
zinyan.com
2022/12/07
12K0
Jenkins 常用插件介绍
Jenkins(hudson)插件记录
搭建自动化构建(jenkins)的过程中碰到了挺多问题,需要装各种插件解决。为了方便下次部署,这里先记录一下用到的插件及用途
owent
2023/03/06
5570
Jenkins实践文档-管理Jenkins(项目、视图、插件)
第三章 管理Jenkins(项目、视图、插件) 1. 项目管理 1.1 命名规范 业务名称-应用名称-应用类型_环境类型: cxy-wlck-ui_TEST, 只有命名规范才方便管理项目。 1.2 新
DevOps云学堂
2019/10/18
1.1K0
Jenkins实践文档-管理Jenkins(项目、视图、插件)
如何使用Sonatype Nexus管理Helm Charts
Helm是Kubernetes的最受欢迎的软件包管理工具。它允许DevOps团队对Kubernetes应用程序进行版本控制,分发和管理。尽管可以使用标准的kubectl命令和Kubernetes清单YAML文件,但是当组织从事微服务体系结构时-数百个容器相互交互-这就需要对Kubernetes清单进行版本化和管理。
DevOps云学堂
2020/06/19
3.6K0
点击加载更多

相似问题

如何配置Mattermost插件

24

Android Emulator Jenkins插件无法工作

33

Jenkins中的JIRA插件无法工作

14

更新插件角色策略插件后,jenkins无法工作

3194

Jenkins + GitHub插件网络钩子无法工作

13
添加站长 进交流群

领取专属 10元无门槛券

AI混元助手 在线答疑

扫码加入开发者社群
关注 腾讯云开发者公众号

洞察 腾讯核心技术

剖析业界实践案例

扫码关注腾讯云开发者公众号
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档