Skip to content

global is not defined #2618

@volkanunsal

Description

@volkanunsal

⚠️ IMPORTANT ⚠️ Please do not ignore this template. If you do, your issue will be closed immediately.

Describe the bug

I'm getting global is not defined error.

Screen Shot 2021-03-20 at 5 38 00 PM

Reproduction

The header of the file has this comment block.

/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <http://feross.org>
 * @license  MIT
 */
/* eslint-disable no-proto */

It seems to be coming from a module that includes Node.js modules, and the browser equivalent has been included, and there is a global keyword in there, which vitejs cannot seem to handle.

System Info

vite@2.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions