npm install时 node-sass npm ERR command failed问题解决

这篇具有很好参考价值的文章主要介绍了npm install时 node-sass npm ERR command failed问题解决。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

显示的错误信息

npm ERR! code 1
npm ERR! path C:\Users\li-671\Downloads\light-blue-vue-admin-master\node_modules\node-sass
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/build.js
npm ERR! Building: C:\Program Files\nodejs\node.exe C:\Users\li-671\Downloads\light-blue-vue-admin-master\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli   'C:\\Program Files\\nodejs\\node.exe',
npm ERR! gyp verb cli   'C:\\Users\\li-671\\Downloads\\light-blue-vue-admin-master\\node_modules\\node-gyp\\bin\\node-gyp.js',
npm ERR! gyp verb cli   'rebuild',
npm ERR! gyp verb cli   '--verbose',
npm ERR! gyp verb cli   '--libsass_ext=',
npm ERR! gyp verb cli   '--libsass_cflags=',
npm ERR! gyp verb cli   '--libsass_ldflags=',
npm ERR! gyp verb cli   '--libsass_library='
npm ERR! gyp verb cli ]
npm ERR! gyp info using node-gyp@8.4.1
npm ERR! gyp info using node@18.12.1 | win32 | x64
npm ERR! gyp verb command rebuild []
npm ERR! gyp verb command clean []
npm ERR! gyp verb clean removing "build" directory
npm ERR! gyp verb command configure []
npm ERR! gyp verb download using dist-url https://npm.taobao.org/dist
npm ERR! gyp verb find Python Python is not set from command line or npm configuration
npm ERR! gyp verb find Python Python is not set from environment variable PYTHON
npm ERR! gyp verb find Python checking if "python3" can be used
npm ERR! gyp verb find Python - executing "python3" to get executable path
npm ERR! gyp verb find Python - "python3" is not in PATH or produced an error
npm ERR! gyp verb find Python checking if "python" can be used
npm ERR! gyp verb find Python - executing "python" to get executable path
npm ERR! gyp verb find Python - executable path is "C:\ProgramData\Anaconda3\python.exe"
npm ERR! gyp verb find Python - executing "C:\ProgramData\Anaconda3\python.exe" to get version
npm ERR! gyp verb find Python - version is "3.9.12"
npm ERR! gyp info find Python using Python version 3.9.12 found at "C:\ProgramData\Anaconda3\python.exe"
npm ERR! gyp verb get node dir no --target version specified, falling back to host node version: 18.12.1
npm ERR! gyp verb command install [ '18.12.1' ]

出现错误后,找了很多方法,网上关于这个问题的解决方法也很多,尝试了两三天,最后发现了一个终极解决方案,亲测有效!!!,下面是链接。

npm install 时 node-sass npm ERR command failed问题解决 文章来源地址https://www.toymoban.com/news/detail-557616.html

到了这里,关于npm install时 node-sass npm ERR command failed问题解决的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 解决 npm ERR! node-sass 和 gyp ERR! node-gyp 报错问题

    如果你机器里的node版本太高,又不想卸载重新安装低版本的node,可以安装一个 NVM 版本管理工具,随时切换node版本 1.下载安装nvm:nvm for windows 2.安装nvm后在命令窗口输入命令 nvm,出现一堆提示文字后成功。 3.执行安装node版本命令 安装指定版本(以14.18.3为例) 一些nvm常用命

    2023年04月08日
    浏览(36)
  • 解决sass问题:npm ERR! node-sass@9.0.0 postinstall: `node scripts/build.js`

    目录 一、遇到问题 解决办法 二、 再次遇到问题  解决办法  题外话 1. 运行这个项目的适合,遇到了没有sass的问题 解决办法 然后就用命令下载sass 2. 下载sass的时候又发现了一个这样的问题 解决办法  检查在这个错误之前有没有其他的错误出现 ,如果有就先去解决其他的

    2024年02月06日
    浏览(43)
  • 解决npm install安装node-sass包容易失败的问题

     具体问题如下: 2、问题分析 npm版本过高 3、问题解决 npm install npm@6.14.10 -g 如果还提示出现 python 的信息,说明还需要安装python,去python官网下载对应版本的安装包安装即可,一般是2.7版本。python官网下载 如果提示 这些等乱七八糟的基本上就是node-sass 版本冲突问题 直接去

    2024年04月13日
    浏览(38)
  • vue项目启动npm install和npm run serve时出现错误Failed to resolve loader:node-sass

    解决方法: 解决方法: node sass-node loader-sass 14.16.0 4.14.1 8.0.2

    2024年04月26日
    浏览(33)
  • 解决npm ERR! path E:\XXX\node_modules\node-sass的问题

    在Node.js项目中,我们经常使用npm来安装和管理各种依赖包。然而,有时候我们可能会遇到一些关于npm的错误,其中最常见的就是\\\"npm ERR! path E:XXXnode_modulesnode-sass\\\"。这个错误通常是由于node-sass的路径问题导致的。下面我将详细介绍如何解决这个问题。 首先,我们需要确定问

    2024年02月20日
    浏览(39)
  • node-sass 安装失败 Command failed 报错 node_modules\node-sass: Command failed. Exit code: 1

    通过 yarn install 安装依赖包 node-sass 时总是报错, 具体的错误原因为 当前使用的node版本与依赖的node-sass版本不匹配,调整当前node版本,建议使用nvm来控制node版本切换 具体对应关系如下: NodeJS Supported node-sass version Node Module Node 19 8.0+ 111 Node 18 8.0+ 108 Node 17 7.0+, 8.0 102 Node 16 6

    2024年02月04日
    浏览(34)
  • npm ERR! path E:node_modules\node-sass

    分析报错发现有关 python2 环境相关报错 解决办法: 需要再电脑中安装python 2.X版本的环境 因为我本地电脑有python 3.9的环境,所以我 使用 Anaconda安装python环境 1、安装 python 2.7 2、激活虚拟环境 3、找到环境位置 4、使用 node配置python环境 到此结束 重新安装node依赖就可以了

    2024年04月08日
    浏览(63)
  • npm ERR! node-sass@6.0.1 postinstall: `node scripts/build.js`

    vue npm install提示以下错误  尝试用下面的方式重新安装弄得-saas,结果不起作用 。 npm config set sass_binary_site=https://npm.taobao.org/mirrors/node-sass npm install node-sass 这时考虑降级node版本,node.js从10.0-8.17版本。  运行npm install还是报同样的错误 最后继续查找解决方案,发现使用下面的

    2024年02月07日
    浏览(38)
  • vue node_modules\node-sass: Command failed. 安装失败,如何解决,使用 sass 替换

    package.json vue 项目中,安装依赖的时候出现错误,如下: package.json 中有个 node-sass 的包,在安装并编译这个的时候出现问题 node-sass 的主要功能是将 sass/scss - css ,跟 sass 的作用是一样的, sass 是 dart 语言写的, 直接用 sass 替换掉 node-sass 即可 在使用 vue create appName 创建 vue 项

    2024年02月03日
    浏览(34)
  • 执行npm install时老是安装不成功node-sass的原因和解决方案

    相信你安装前端项目所需要的依赖包(npm install 或 yarn install)时,有可能会出现如下报错: 那么到底是什么原因导致这个问题出现呢? 最多的原因还是 node的版本 和node-sass的版本不一致,比如node版本是 16+的,而你的版本还是旧的 “node-sass”: “^4.14.1”。因为node并不会兼容

    2024年02月06日
    浏览(43)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包