Skip to content

Uncaught TypeError: global is undefined #21

@raboof

Description

@raboof

When I check out the project, npm install, npm run start and open the sample in the browser (tried both Firefox and Chromium), I don't get a functional sample:

peri

And in the javascript console:

Uncaught TypeError: global is undefined
    parcelRequire<["node_modules/node-libs-browser/node_modules/buffer/index.js"]< index.js:43
    newRequire src.f10117fe.js:47
    localRequire src.f10117fe.js:53
    parcelRequire<["node_modules/lodash/lodash.js"]< src.f10117fe.js:2377
    newRequire src.f10117fe.js:47
    localRequire src.f10117fe.js:53
    parcelRequire<["src/micromerge.ts"]< micromerge.ts:3
    newRequire src.f10117fe.js:47
    localRequire src.f10117fe.js:53
    parcelRequire<["src/bridge.ts"]< bridge.ts:5
    newRequire src.f10117fe.js:47
    localRequire src.f10117fe.js:53
    parcelRequire<["src/index.ts"]< index.ts:1
    newRequire src.f10117fe.js:47
    parcelRequire src.f10117fe.js:81
    <anonymous> src.f10117fe.js:120

npm run test is fine, node v14.18.1, npm 6.14.15

the global seems to have been removed from buffer between 4.x and 5.0 (in feross/buffer@8746070#diff-e727e4bdf3657fd1d798edcd6b099d6e092f8573cba266154583a746bba0f346R41), but node-libs-browser is still on 4.x and not interested in updating.

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