Skip to content

'ReferenceError: self is not defined' when importing OnramperWidget #26

@parketh

Description

@parketh

I am trying to integrate the Onramper Widget to a NextJS project and have tried installing @onramper/widget using both the npm and yarn package managers.

Importing the widget import OnramperWidget from "@onramper/widget" results in the following error:

Uncaught at Object. (file:///Users/parkyeung/Documents/Programming/collective-v1/node_modules/@onramper/widget/dist/index.js:2:309)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.@onramper/widget (file:///Users/parkyeung/Documents/Programming/collective-v1/.next/server/pages/index.js:32:18)
at webpack_require (file:///Users/parkyeung/Documents/Programming/collective-v1/.next/server/webpack-runtime.js:33:42)
at eval (webpack-internal:///./pages/index.js:11:74)

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