我成功地运行了yarn add html-to-text。包在package.json列表中。现在,当我试图像手册中所描述的那样要求模块时,它说的是Error: Cannot find module html-to-text。同一存储库正在另一台膝上型计算机(Mac)上工作。我正在使用Windows,但我不认为这是问题所在。
const { convert } = require('html-to-text');有什么想法吗?
编辑
它看起来是与其他新的模块太!运行yarn会将其添加到node_modules中,但它表示import上的Module not found
发布于 2021-11-10 15:43:04
我需要运行yarn docker --build,它成功了。
发布于 2021-11-16 07:38:31
您也可以使用它。
npm安装html到text
然后使用
const {转换}=需要量(‘html-text’);
这可能对你有帮助
https://stackoverflow.com/questions/69842291
复制相似问题