Browserify 因事件依赖而失败

Browserify failing on events dependency

我的 browserify gulp 构建失败并出现以下错误:

events.js:72
        throw er; // Unhandled 'error' event
              ^

SyntaxError: 'import' and 'export' may appear only with 'sourceType: module'

Events 似乎是 browserify 依赖项。我在 SO 上发现的所有其他错误都与使用 .es6 文件的人有关,但我不是。在我看来,昨晚一切正常。这是一个非常简单的构建。只需一些简单的 .js 文件即可。抱歉,我知道这不是很具体……找了一段时间但似乎无法确定。谢谢!

好吧,我不觉得害羞吗。 在我的一个模块中,我将方法调用错误地输入为:

export.module

而不是

module.exports