繁体   English   中英

./node_modules/@selderee/plugin-htmlparser2/lib/hp2-builder.mjs 尝试导入错误:“Picker”未从“selderee”导出

[英]./node_modules/@selderee/plugin-htmlparser2/lib/hp2-builder.mjs Attempted import error: 'Picker' is not exported from 'selderee'

当我要导入 htmlToText 包时,出现此错误

import { htmlToText } from 'html-to-text';

然后我得到了这个错误

./node_modules/@selderee/plugin-htmlparser2/lib/hp2-builder.mjs
Attempted import error: 'Picker' is not exported from 'selderee'.

我遇到了同样的问题。 如果你有一个完整的 React 应用程序,这对我有用。
在 Axios 请求的正文中将 html 从前端发送到后端。 在您的 API 端点调用 html-to-text,然后将响应发送回您将使用它的前端

就我而言,我的 html-to-text 版本是 7.0.0

解决方案是安装:

html 到文本 ^7.1.1

降级到 7.1.1 版本

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM