首页 > 解决方案 > 未找到模块:导入 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

我是新手,任何帮助将不胜感激!

谢谢!

标签: node.jsreactjscreate-react-appnpm-install

解决方案


我有同样的问题,当我安装http2模块时它得到了修复,尝试使用npm i http2;


推荐阅读