异常信息

npm ERR! code 1
npm ERR! path D:demo
ode_modules
ode-sass
npm ERR! command failed
npm ERR! command C:Windowssystem32cmd.exe /d /s /c node scripts/build.js
npm ERR! Building: C:Program Files
odejs
ode.exe D:demo
ode_modules
ode-gypin
ode-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

odejs
ode.exe’,
npm ERR! gyp verb cli ‘D:\demo
ode_modules
ode-gyp\bin
ode-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@3.8.0
npm ERR! gyp info using node@16.3.0 | 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 check python checking for Python executable “python2” in the PATH
npm ERR! gyp verb which failed Error: not found: python2
npm ERR! gyp verb which failed at getNotFoundError (D:demo
ode_moduleswhichwhich.js:13:12)
npm ERR! gyp verb which failed at F (D:demo
ode_moduleswhichwhich.js:68:19)
npm ERR! gyp verb which failed at E (D:demo
ode_moduleswhichwhich.js:80:29)
npm ERR! gyp verb which failed at D:demo
ode_moduleswhichwhich.js:89:16
npm ERR! gyp verb which failed at D:demo
ode_modulesisexeindex.js:42:5
npm ERR! gyp verb which failed at D:demo
ode_modulesisexewindows.js:36:5
npm ERR! gyp verb which failed at FSReqCallback.oncomplete (node:fs:195:21)
npm ERR! gyp verb which failed python2 Error: not found: python2
npm ERR! gyp verb which failed at getNotFoundError (D:demo
ode_moduleswhichwhich.js:13:12)
npm ERR! gyp verb which failed at F (D:demo
ode_moduleswhichwhich.js:68:19)
npm ERR! gyp verb which failed at E (D:demo
ode_moduleswhichwhich.js:80:29)
npm ERR! gyp verb which failed at D:demo
ode_moduleswhichwhich.js:89:16
npm ERR! gyp verb which failed at D:demo
ode_modulesisexeindex.js:42:5
npm ERR! gyp verb which failed at D:demo
ode_modulesisexewindows.js:36:5
npm ERR! gyp verb which failed at FSReqCallback.oncomplete (node:fs:195:21) {
npm ERR! gyp verb which failed code: ‘ENOENT’
npm ERR! gyp verb which failed }
npm ERR! gyp verb check python checking for Python executable “python” in the PATH
npm ERR! gyp verb which succeeded python C:UsersAdministratorAppDataLocalProgramsPythonPython39python.EXE
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Command failed: C:UsersAdministratorAppDataLocalProgramsPythonPython39python.EXE -c import sys; print “%s.%s.%s” % sys.version_info[:3];
npm ERR! gyp ERR! stack File “”, line 1
npm ERR! gyp ERR! stack import sys; print “%s.%s.%s” % sys.version_info[:3];
npm ERR! gyp ERR! stack ^
npm ERR! gyp ERR! stack SyntaxError: invalid syntax
npm ERR! gyp ERR! stack
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:326:12)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:394:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1067:16)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! gyp ERR! System Windows_NT 10.0.19042
npm ERR! gyp ERR! command “C:\Program Files
odejs
ode.exe” “D:\demo
ode_modules
ode-gyp\bin
ode-gyp.js” “rebuild” “–verbose” “–libsass_ext=” “–libsass_cflags=” “–libsass_ldflags=” “–libsass_library=”
npm ERR! gyp ERR! cwd D:demo
ode_modules
ode-sass
npm ERR! gyp ERR! node -v v16.3.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1

npm ERR! A complete log of this run can be found in:
npm ERR!     C:UsersAdministratorAppDataLocal
pm-cache_logs?1-06-22T01_36_13_984Z-debug.log

配置环境变量

这个是为了排除没有权限,路径自定义

NODE_PATH=D: ode_global ode_modules

PATH中的关键路径往前放

全局安装cnpm

npm config set registry http://registry.npm.taobao.org/
npm i cnpm

安装windows平台编译环境

npm install -g node-gyp
npm install --global --production windows-build-tools

变更package.json中的node-sass版本

“node-sass”: “~4.12.0” 变更为 “node-sass”: “v4.13.0”

删除根目录下的node_modules文件夹

cnpm重新安装

cnpm i

NPM安装依赖包,报错node-gyp rebuild...解决方法相关推荐

  1. npm安装依赖包报错

    最近在新下载了一个项目,需要 npm i 下载依赖,,但是一直报错,, 首先用cnpm源下载 $ npm install -g npm npm ERR! code E500 npm ERR! 500 ...

  2. yarn安装依赖包报错 error An unexpected error occurred: “https://registry.npm.taobao.orgnpm/element-ui: get

    yarn安装依赖包报错,error An unexpected error occurred: "https://registry.npm.taobao.orgnpm/element-ui: ...

  3. pip 安装依赖包 报错 No matching distribution found for pandas

    在pycharm中的terminal中使用pip安装依赖包时,出现No matching distribution found for pandas的错误提示 这里是在虚拟环境中,安装依赖包 结果抛出 ...

  4. 安装R包报错 [tcl] grab failed: window not viewable.的解决方案

    安装R包报错 [tcl] grab failed: window not viewable.的解决方案 ##方法一:用下代码自己选择镜像 chooseCRANmirror(graphics=F) ## ...

  5. R安装nCov2019包报错:Failed to install 'unknown package' from GitHub: schannel: failed to receive handsh

    在Rstudio中,安装nCov2019包报错:Failed to install 'unknown package' from GitHub: schannel: failed to receive ...

  6. Win10安装Rtree包报错:OSError: could not find or load spatialindex_c-64.dll

    安装Rtree包报错:OSError: could not find or load spatialindex_c-64.dll 解决办法:https://www.lfd.uci.edu/~gohlk ...

  7. mac下npm安装全局组件报错

    1.没有权限安装 在你的安装指令前面加上sudo,然后会提醒你输入密码,这个密码是你mac的开机解锁码!如: sudo npm install egg-init -g 2.更换全局变量文件夹 2.1. ...

  8. python安装cv2包报错解决方法

    1.在pycharm中安装cv2包报错 ERROR: Could not find a version that satisfies the requirement cv2 (from version ...

  9. Mac安装pkg包报错:安装失败 “安装器遇到了一个错误,导致安装失败,请联系软件制造商以获得帮助

    Mac安装pkg包报错:安装失败 "安装器遇到了一个错误,请联系软件制造商以获得帮助 打开终端,输入: sudo spctl --master-disable 然后输入锁屏密码. 然后在[系 ...

  10. windows下 python 使用 pip 安装TA-Lib报错的原因及解决方法

    windows下 python 使用 pip 安装TA-Lib报错的原因及解决方法 问题环境 问题描述 问题原因 & 解决办法 问题环境 Windows 10 x64 .python 3.8. ...

最新文章

  1. Chapter 4.SQL编程
  2. Ignite 的helloworld第二弹!(附源码!下载即用)
  3. 结构体中的malloc 与 free
  4. Python数据结构学习笔记——树和图
  5. AD 脚本kixtart运用之五(用户电脑屏保设置)
  6. 容器化单页面应用中Nginx反向代理与Kubernetes部署
  7. 中职 计算机老师 教cad,教师博客应用于职校计算机CAD教学探究.doc
  8. Oracle学习 第18天 .NET连接Oracle
  9. pythonos模块使用技巧大全_Python os模块常用部分功能总结
  10. 算法学习--链表/Hash--LRU cache
  11. 10个Jquery幻灯片插件教程
  12. cocos2d-x 使用BMFont生成中文字体并应用
  13. python3 词频统计代码_Python词频统计代码,python
  14. SQLServer 数据库之锁
  15. 微信小程序图片上传一直loading中,上传没反应
  16. 微信网页授权 Vue
  17. Unity 正交相机和透视相机的屏幕适配
  18. hao123.com 360浏览器等主页被劫持的解决方法
  19. 《自控力》——凯利.麦格尼格尔
  20. 【深度学习概念】感受野

热门文章

  1. win10自带看图工具找不到了怎么办?
  2. springboot基于微信小程序的在线考试系统
  3. C++默认参数(缺省参数)应该写在哪里,声明还是定义里
  4. 计算机丢失msvcr100.dll解决办法,计算机丢失MSVCR100.dll
  5. iOS开发-思维导图(初级)
  6. 记2019届阿里校招第一面
  7. 51nod-1429 巧克力
  8. Python str转为list list转为str
  9. Python爬虫编程思想(82):管理SQLite数据库
  10. 手淘首页流量突然暴跌的原因,怎么办?