当前位置: 首页 > 知识库问答 >
问题:

错误/node\u模块/node sass:命令失败

燕航
2023-03-14

当我尝试在本地安装vue store front时,但当我尝试“Thread install”命令时,我出现以下错误。如何解决此错误?如何解决此错误?

error /var/www/html/vue-storefront/node_modules/node-sass: Command failed.
Exit code: 1
Command: node scripts/build.js
Arguments: 
Directory: /var/www/html/vue-storefront/node_modules/node-sass
Output:
Building: /usr/bin/node /var/www/html/vue-storefront/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 [
gyp verb cli   '/usr/bin/node',
gyp verb cli   '/var/www/html/vue-storefront/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 verb cli ]
gyp info using node-gyp@3.8.0
gyp info using node@13.9.0 | linux | 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 "/usr/bin/python3.6" in the PATH
gyp verb `which` succeeded /usr/bin/python3.6 /usr/bin/python3.6
gyp ERR! configure error 
gyp ERR! stack Error: Command failed: /usr/bin/python3.6 -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack   File "<string>", line 1
gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack                                ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack 
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:303:12)
gyp ERR! stack     at ChildProcess.emit (events.js:321:20)
gyp ERR! stack     at maybeClose (internal/child_process.js:1026:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
gyp ERR! System Linux 4.15.0-88-generic
gyp ERR! command "/usr/bin/node" "/var/www/html/vue-storefront/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /var/www/html/vue-storefront/node_modules/node-sass
gyp ERR! node -v v13.9.0

共有3个答案

曾光远
2023-03-14

我正在运行Rails 6,由于某种原因,它正在拉webpacker 4.3.0,它拉的是节点sass 4.3.0,而不是本帖发布之日最新的6.0.0。

对我起作用的是:

  1. 删除节点模块文件夹,包锁。json和纱线。锁定
  2. 在我的软件包中。json,我升级了rails/webpacker:5.3.0
  3. 然后我重新运行了纱线安装
  4. 然后我运行了纱线添加节点sass

在尝试了以上所有方法后,这种方法很有魅力。

我相信这些都是准确的步骤,尽管说实话,我一直在尝试很多事情,但它们都没有奏效,我最终还是成功了,所以有可能我错过了一步,但我尽了最大努力,为任何未来受挫的灵魂重新创造了它。

夏侯旻
2023-03-14

我有同样的问题升级node-sass版本与node-sass版本相同。

yarn add node-sass

这将升级版本并修复问题

公良天逸
2023-03-14

我有同样的问题,我解决了步骤:

  1. 如果您使用的是Apple M1芯片,请使用Rosetta 2运行终端(可选,仅当您的节点安装了Rosetta时才需要)
  2. 检查包中的节点sass版本。json,并与下表进行比较:
 类似资料:
  • 我已经看过了https://bugs.python.org/issue34036但这没有帮助。 我试图安装python使用下面的命令 但它抛出了以下错误 如果缺少所需的版本,请尝试升级pyenv: 下载Python-3.7。0.5焦油。xz- 构建失败(Ubuntu 16.04使用python-build 20180424) 检查或清理工作树在 /tmp/python-build.20181018

  • bl_update 源代码: systemcmds/bl_update 从文件烧写引导程序的实用程序 用法 bl_update [参数...] setopt 设置可选位来解锁FLASH(仅在锁定状态时需要) <file> 引导程序的二进制文件 config 源代码: systemcmds/config 配置传感器驱动器(采样率、发布频率以及范围等等) 用法

  • 当我运行tns run android时,我正在尝试构建一个nativescript应用程序。我遇到以下错误: 失败:生成失败,出现异常。 > 错误:任务执行失败:app:transformNativeLibsWithStripDebugSymbolForDebug。 启动进程“command”C:\Users\Natasha\AppData\Local\Android\Sdk\ndk bundl

  • 当我运行“react-native run-android”或“npx react-native run-android”或“cd andriod./gradlew clean”这些命令时,错误会显示出来 我也尝试使用最新版本的Gradle! OS Windows 10节点:14.2.0 java:java版本“1.8.0_251”java(TM)SE运行时环境(build 1.8.0_251-B

  • 问题内容: 我的Node应用程序在本地运行良好,但是在部署到Heroku时遇到错误。该应用程序使用Sequelize在一个文件夹,其中包含,和。在本地,我可以使用中的以下代码导入模型: 这很好,但是,当我部署到Heroku时,应用程序崩溃并显示以下错误: 最初我以为是由于区分大小写(本地mac与heroku linux),但是我移动了文件,进行了git commit,然后又移回并再次提交,以确保在

  • 下列页面给出了PX4模块、驱动和命令的相关文档。这些文档描述了所提供的功能,高级实现概述以及如何使用命令行界面。 Note 这是从源代码自动生成的,并且包含最新的模块文档。 这不是一个完整的列表,并且NuttX提供了一些额外的命令(例如free)。 在控制台使用help来获取所有可用命令的列表,在大多数情况下,command help将给出用法说明。 因为这份文档是从源代码生成的,所以有任何错误的