• Failed at the node-sass@4.13.1 postinstall script.


    在这里插入图片描述
    gyp ERR! configure error
    gyp ERR! stack Error: Command failed: D:\dev\envs\Python\Python37\python.EXE -c import sys; print “%s.%s.%s” % sys.version_info[:3];
    gyp ERR! stack File “”, 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:390:12)
    gyp ERR! stack at ChildProcess.emit (events.js:400:28)
    gyp ERR! stack at maybeClose (internal/child_process.js:1055:16)
    gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
    gyp ERR! System Windows_NT 10.0.19044
    gyp ERR! command “D:\dev\envs\nodejs\node.exe” “D:\BaiduNetdiskDownload\dnpicture\node_modules\node-gyp\bin\node-gyp.js” “rebuild” “–verbose” “–libsass_ext=” “–libsass_cflags=” “–libsass_ldflags=” “–libsass_library=”
    gyp ERR! cwd D:\BaiduNetdiskDownload\dnpicture\node_modules\node-sass
    gyp ERR! node -v v14.17.6
    gyp ERR! node-gyp -v v3.8.0
    Build failed with error code: 1
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules\fsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“x64”})

    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! node-sass@4.13.1 postinstall: node scripts/build.js
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the node-sass@4.13.1 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\MQ\AppData\Roaming\npm-cache_logs\2022-08-10T05_51_05_253Z-debug.log

    解决办法

    1、先执行 npm uninstall node-sass 卸载之前可能遗留的node-sass。
    2、再执行 npm i node-sass --sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
    3、再执行npm install 安装成功
    
    • 1
    • 2
    • 3
  • 相关阅读:
    一文讲明白阿里云ace认证的含金量!
    火山引擎实时、低延时拥塞控制算法的优化实践
    asp.net core之EfCore
    老卫带你学---conda activate无效
    郑州团购分销小程序开发如何运营?
    JVM常用参数
    CCF中国开源大会,中电金信与行业共探AI技术在金融行业的应用和前景
    【Educoder作业】MySQL开发技巧 - 批量数据入库及检索
    计算机毕业设计Java教学视频平台系统(源码+系统+mysql数据库+lw文档)
    NIO-Socket实现简易聊天室
  • 原文地址:https://blog.csdn.net/qq_46199553/article/details/126265140