node.js - 未找到模块:导入 Clarifai API 后无法解析“http2”
问题描述
我收到此错误:
Failed to compile
./node_modules/@grpc/grpc-js/build/src/server.js
Module not found: Can't resolve 'http2' in 'C:\Users\Nene\Desktop\WebWork\face-recognition-app\node_modules\@grpc\grpc-js\build\src'
This error occurred during the build time and cannot be dismissed.
每当我尝试导入 Clarifai API 时,使用create-react-app
设置。
我在运行 Windows 10 节点版本的 Windows 机器上:16.6.1 npm 版本:7.20.3
我是新手,任何帮助将不胜感激!
谢谢!
解决方案
我有同样的问题,当我安装http2模块时它得到了修复,尝试使用npm i http2
;
推荐阅读
- javascript - 如何在 Reactjs 应用程序中添加带有超链接的“a”链接标签
- groovy - 如何使用soap ui中的groovy捕获shell脚本输出?
- python - “反向”转置/展平
- javascript - 使用拨动开关而不是按钮或链接制作 bootsrap4.x 导航药丸,使其切换
- c# - Soapheader 无法序列化
- c# - 如何在一个实体中实现没有链接的一对一关系
- r - 用数据框中的值替换 unicode
- javascript - Instascan 无法在 js 上运行,显示“无法访问视频流 (TypeError)”
- sql - 值更改时,regexp_substr 不起作用
- django - 创建新项目目录时是否必须再次安装 django?