Javascript 尝试使用Browserify从浏览器运行npm包(可读性),但未成功

Javascript 尝试使用Browserify从浏览器运行npm包(可读性),但未成功,javascript,node.js,browserify,Javascript,Node.js,Browserify,因此,我正在尝试从浏览器中提供可读性JS 我想稍后在我的应用程序中使用它,我正在使用BrowserifyJS+beefyJS使其工作 在这里,我试图公开我想要使用的函数: var read = require("readability-js"); module.exports = (url) => read(url, (err, article, meta) => { // Main Article console.log(article.content.text());

因此,我正在尝试从浏览器中提供可读性JS

我想稍后在我的应用程序中使用它,我正在使用BrowserifyJS+beefyJS使其工作

在这里,我试图公开我想要使用的函数:

var read = require("readability-js");

module.exports = (url) => read(url, (err, article, meta) => {
  // Main Article
  console.log(article.content.text());
// 
  // Title
  console.log(article.title);

  // Article HTML Source Code
  console.log(article.content.html());
});

然后我使用index.js中的函数

var readability = require("./Readability");

const url = "https://tim.blog/2019/10/31/edward-norton-motherless-brooklyn/";
readability(url);

之后,我将运行browserify来生成bundle.js,并运行beefy来运行所有这些

browserify index.js -o bundle.js
beefy index.js 8080
以下是我得到的:

bundle.js:35798 Uncaught TypeError: Cannot read property 'content' of undefined
    at bundle.js:35798
    at bundle.js:62995
    at Request._callback (bundle.js:62933)
    at self.callback (bundle.js:63402)
    at emitOne (bundle.js:16927)
    at Request.emit (bundle.js:17005)
    at Request.self._buildRequest (bundle.js:63634)
    at Request.init (bundle.js:63812)
    at new Request (bundle.js:63378)
    at request (bundle.js:63059)
你能帮我把它做好吗