npm ERR! gyp verb等一系列错

article/2025/10/4 15:17:43
npm ERR! code 1
npm ERR! path F:\新桌面\大三下\生产实习\mock-devices-master\mock-devices-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: E:\Environment\Nodejs\node.exe F:\新桌面\大三下\生产实习\mock-devices-master\mock-devices-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   'E:\\Environment\\Nodejs\\node.exe',
npm ERR! gyp verb cli   'F:\\新桌面\\大三下\\生产实习\\mock-devices-master\\mock-devices-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@3.8.0
npm ERR! gyp info using node@16.16.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 download using dist-url https://npm.taobao.org/dist
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 (F:\新桌面\大三下\生产实习\mock-devices-master\mock-devices-master\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed     at F (F:\新桌面\大三下\生产实习\mock-devices-master\mock-devices-master\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed     at E (F:\新桌面\大三下\生产实习\mock-devices-master\mock-devices-master\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed     at F:\新桌面\大三下\生产实习\mock-devices-master\mock-devices-master\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed     at F:\新桌面\大三下\生产实习\mock-devices-master\mock-devices-master\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed     at F:\新桌面\大三下\生产实习\mock-devices-master\mock-devices-master\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:198:21)
npm ERR! gyp verb `which` failed  python2 Error: not found: python2
npm ERR! gyp verb `which` failed     at getNotFoundError (F:\新桌面\大三下\生产实习\mock-devices-master\mock-devices-master\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed     at F (F:\新桌面\大三下\生产实习\mock-devices-master\mock-devices-master\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed     at E (F:\新桌面\大三下\生产实习\mock-devices-master\mock-devices-master\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed     at F:\新桌面\大三下\生产实习\mock-devices-master\mock-devices-master\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed     at F:\新桌面\大三下\生产实习\mock-devices-master\mock-devices-master\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed     at F:\新桌面\大三下\生产实习\mock-devices-master\mock-devices-master\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:198: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` failed Error: not found: python
npm ERR! gyp verb `which` failed     at getNotFoundError (F:\新桌面\大三下\生产实习\mock-devices-master\mock-devices-master\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed     at F (F:\新桌面\大三下\生产实习\mock-devices-master\mock-devices-master\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed     at E (F:\新桌面\大三下\生产实习\mock-devices-master\mock-devices-master\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed     at F:\新桌面\大三下\生产实习\mock-devices-master\mock-devices-master\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed     at F:\新桌面\大三下\生产实习\mock-devices-master\mock-devices-master\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed     at F:\新桌面\大三下\生产实习\mock-devices-master\mock-devices-master\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:198:21)
npm ERR! gyp verb `which` failed  python Error: not found: python
npm ERR! gyp verb `which` failed     at getNotFoundError (F:\新桌面\大三下\生产实习\mock-devices-master\mock-devices-master\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed     at F (F:\新桌面\大三下\生产实习\mock-devices-master\mock-devices-master\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed     at E (F:\新桌面\大三下\生产实习\mock-devices-master\mock-devices-master\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed     at F:\新桌面\大三下\生产实习\mock-devices-master\mock-devices-master\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed     at F:\新桌面\大三下\生产实习\mock-devices-master\mock-devices-master\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed     at F:\新桌面\大三下\生产实习\mock-devices-master\mock-devices-master\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:198:21) {
npm ERR! gyp verb `which` failed   code: 'ENOENT'
npm ERR! gyp verb `which` failed }
npm ERR! gyp verb could not find "python". checking python launcher
npm ERR! gyp verb could not find "python". guessing location
npm ERR! gyp verb ensuring that file exists: C:\Python27\python.exe
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
npm ERR! gyp ERR! stack     at PythonFinder.failNoPython (F:\新桌面\大三下\生产实习\mock-devices-master\mock-devices-master\node_modules\node-gyp\lib\configure.js:484:19)
npm ERR! gyp ERR! stack     at PythonFinder.<anonymous> (F:\新桌面\大三下\生产实习\mock-devices-master\mock-devices-master\node_modules\node-gyp\lib\configure.js:509:16)
npm ERR! gyp ERR! stack     at callback (F:\新桌面\大三下\生产实习\mock-devices-master\mock-devices-master\node_modules\graceful-fs\polyfills.js:295:20)
npm ERR! gyp ERR! stack     at FSReqCallback.oncomplete (node:fs:198:21)
npm ERR! gyp ERR! System Windows_NT 10.0.19044
npm ERR! gyp ERR! command "E:\\Environment\\Nodejs\\node.exe" "F:\\新桌面\\大三下\\生产实习\\mock-devices-master\\mock-devices-master\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd F:\新桌面\大三下\生产实习\mock-devices-master\mock-devices-master\node_modules\node-sass
npm ERR! gyp ERR! node -v v16.16.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\lenovo\AppData\Local\npm-cache\_logs\2022-07-31T02_48_35_232Z-debug.log

在这里插入图片描述

出这个错,然后经过搜索,首先发现了回答:
[Versions of node-gyp that are earlier than v9.x.x]
好像要安装Visual Stdio
(https://github.com/nodejs/node-gyp/blob/main/docs/README.md)
跟老师确认了一下,老师说:
在这里插入图片描述

安装python2.7
一开始装到E:/Environment之后,仍然报错
在这里插入图片描述
终于找到一个博客,说不能安装到除了C:/python27以外的文件夹。。。


忙活了一下午+一晚上
报起错来像窜稀
找了好多好多好多博客。。。
最后发现问题,不能安装visual stdio 2022。。。
要安装2017
然后检查msvs版本

npm config get msvs_version

指定版本:

npm config set msvs_version 2017

msvs里面要安装:

  • c++桌面开发(里面的MFC要勾选上)
  • Nodejs开发

心累了。。。


http://chatgpt.dhexx.cn/article/sjPHwgYr.shtml

相关文章

gyp ERR find Python 解决方案

命令行报错如下 E:\vue-admin\node_modules\fibers>if not defined npm_config_node_gyp (node "D:\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild --releas e ) else (node "…

数据库-查询数据

查询表中所有字段数据&#xff1a;select * from 表名&#xff1b; 查询表中部分字段数据&#xff1a;select 字段1&#xff0c;字段2 from 表名&#xff1b; 3.运用关系运算符查询&#xff1a;select * from 表名 where 字段名 运算符 数值&#xff08;在单个字段的范围&am…

数据库查询语句

数据库查询语句无疑是所有语句中&#xff0c;最重要的语句&#xff0c;经常配合where一起使用 1. 最基本的查询 公式1&#xff1a;select * from 表名 -- 查看aaa表中的所有数据 SELECT * FROM aaa 你说&#xff0c;我不想查看表中所有的数据&#xff0c;我就想查看表中id字…

数据库查询和数据操纵

根据实验2在学生作业管理数据库Mydb中创建的学生表、课程表和学生作业表&#xff0c;进行以下操作。 使用查询语句完成以下任务&#xff08;每一个查询都要给出SQL语句&#xff0c;并且列出查询结果&#xff09;。 &#xff08;1&#xff09;查询与“张志国”同一班级的学生信息…

数据库中的数据查询

数据库中的数据查询 数据库表是存储数据库中所有数据的对象。在表中&#xff0c;数据按行和列格式逻辑组织&#xff0c;类似于电子表格。 在表中&#xff0c;每行代表一个唯一记录&#xff0c;每列代表记录中的一个字段。例如&#xff0c; SYS_User表包含用户数据&#xff0c;…

数据库---数据查询

实验目的 熟练掌握使用SQL查询语言。完成各类查询操作&#xff08;单表查询&#xff0c;连接查询&#xff0c;嵌套查询&#xff0c;集合查询&#xff09;。 实验内容 现有一个单位内部的小型图书借阅系统&#xff0c;假设每本图书的数量无限制&#xff0c;并且可以借给任何单…

MySQL数据库数据查询

1.投影查询 1.1 查询student表中所有学生的学号、姓名和专业。 1.2 查询student表中所有列。 1.3 查询student表中所有学生的学生的sno、sname、speciality&#xff0c;并将结果中各列的标题分别修改为学号, 姓名, 专业。 1.4 设student1表的表结构和样本数据与student表相同…

MYSQL介绍——数据库查询(重点)

条件查询 很多时候&#xff0c;我们使用数据库时并不是关心表里所有的数据&#xff0c;而是一部分满足条件的数据&#xff0c;这类条件要用WHERE子 句来实现数据的筛选。 SELECT …… FROM …… WHERE 条件 [ AND | OR ] 条件 …… ;下面给出一个示例&#xff1a; SELECT * …

MySQL --- 数据库查询 - 基本查询

基本查询 MySQL 数据库使用SELECT语句来查询数据。 1. 查询多个字段 以下为在MySQL数据库中查询数据通用的 SELECT 语法&#xff1a; SELECT 字段名,字段名... FROM 表名; SELECT * FROM 表名; #查询所有字段 查询语句中可以使用一个或者多个表&#xff0c…

Database:数据库查询

学习笔记&#xff1a;使用SQL语句进行数据查询 Copyright: Jingmin Wei, Pattern Recognition and Intelligent System, School of Artificial and Intelligence, Huazhong University of Science and Technology 文章目录 学习笔记&#xff1a;使用SQL语句进行数据查询准备数…

数据库查询操作

提示&#xff1a;文章写完后&#xff0c;目录可以自动生成&#xff0c;如何生成可参考右边的帮助文档 文章目录 前言一、复杂查询的相关操作&#xff1a;二.表的设计三.聚合查询四.联合查询&#xff1a;五.外连接六.自连接七.子查询八.合并查询 前言 提示&#xff1a;这里可以…

MySQL数据库查询数据

查询数据 数据库管理系统的一个最重要的功能就是数据查询&#xff0c;数据查询不应只是简单查询数据库中存储的数据&#xff0c;还应该根据需要对数据进行筛选&#xff0c;以及确定数据以什么样的格式显示。MySQL提供了功能强大、灵活的语句来实现这些操作。 基本查询语句 mys…

数据库查询语句-详细篇

今天来梳理一下数据库的一些查询语句&#xff0c;做软件/移动端/电脑端&#xff0c;开发程序时必然离不开数据库的设计以及查询&#xff1b; 一&#xff1a;具体的代码如下展示&#xff1a; 1.查询数据库指定表的所有信息 select * from uploadimagecode;2.查询当前数据表部…

数据库的查询操作

数据库的查询操作 1 DQL_基础查询 本案例使用到SQL语句的代码如下&#xff1a; USE db1; -- 使用数据库 CREATE TABLE student ( id int, -- 编号 name varchar(20), -- 姓名 age int, -- 年龄 sex varchar(5), -- 性别 address varchar(100), -- 地址 math int, -- 数学 …

数据库-简单查询

数据库的操作无外乎是增删改查&#xff0c;那么其中的查询是我们作为测试&#xff0c;用得最多的&#xff0c;那查询应该怎么做呢&#xff0c;我们来讲解一下。 1、介绍一下我们举例的表结构 表一&#xff1a; 学生表&#xff1a;&#xff08;学号&#xff0c;姓名&#xff0…

数据库常见的查询

目录 一、查询的完全限定写法 二、条件查询 三、模糊查询 四、范围查询 1&#xff09;关键字&#xff1a;between and 2&#xff09;关键字&#xff1a;in 3&#xff09;关键字&#xff1a;is null或者、is not null和<>null和!null 五、case when 1&#xff09…

查询数据(数据库)——简单查询

目录 1&#xff0e;最简单的查询 &#xff08;1&#xff09;查询指定列 &#xff08;2&#xff09;查询所有列 &#xff08;3&#xff09;查询计算列 &#xff08;4&#xff09;为列起别名 &#xff08;5&#xff09;使用DISTINCT关键字消除重复元组 2&#xff0e;查询满…

数据库之数据的查询

1 目的 1、理解SQL的特点&#xff1b; 2、掌握SELECT命令的使用&#xff1b; 3、掌握单表查询、连接查询、嵌套查询和集合查询&#xff1b; 4、掌握INSERT、UPDATE和DELETE命令的使用&#xff1b; 5、掌握将SQL命令嵌入到C#或其他高级语言&#xff1b; 2 要点 1、单表查询、…

【MySQL】数据库的基本查询

前言 上篇已经讲过数据库与表相关的一些相关的操作了&#xff0c;如果你对这部分依旧不太熟悉建议先去看看 传送门&#xff1a;【MySQL】逻辑库与数据表相关操作. 这篇就来说一下数据库中表的基本查询&#xff0c;看见是基本查询&#xff0c;就知道肯定有高级查询&#xff0…

SQL数据库的查询操作大全(select)

目录&#xff1a; 1、数据库的连接、创建 2、对字段的操作&#xff1a;&#xff08;alter table&#xff09; 3、对数据的操作&#xff08;插入、修改、删除&#xff09; 4、数据查询&#xff08;select&#xff09; 5、多表查询&#xff08;join on&#xff09; 6、约束…