node.js - npm install 失败并出现 python 模块错误
问题描述
我正在尝试安装和运行我从互联网上购买的 react 项目。但是,我运行 npm install 我收到以下错误
gyp verb `which` failed code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` succeeded python /home/AzureUser/Python3/python
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /home/AzureUser/Python3/python -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:294:12)
gyp ERR! stack at ChildProcess.emit (events.js:198:13)
gyp ERR! stack at maybeClose (internal/child_process.js:982:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
gyp ERR! System Linux 4.18.0-193.6.3.el8_2.x86_64
gyp ERR! command "/usr/bin/node" "/var/tmp/thermo-api/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /var/tmp/thermo-api/node_modules/node-sass
gyp ERR! node -v v10.21.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
我对 node.js 很陌生,我不确定出了什么问题?
解决方案
推荐阅读
- c++ - 如何测量图像中每个极点的长度(以像素为单位)
- matlab - 获取调用构造函数的函数的完整路径
- parsing - 无法将 YAGO 分类法加载到 Protege
- c++ - 模板类型的静态 Lambda 成员的 C++ 构造
- php - 搜索 mysql 数据库并从 php 和 html 中的结果创建链接
- php - 排序通过3个表MYSQL
- angular - Angular 中的 NgIf 块中断了 Http 调用
- android - 条形码扫描仪android 5.1中的屏幕模糊和焦点问题
- c - 为什么我除法时会跳过数字?
- java - JFormattedTextField 没有返回正确的文本