Skip to content

Global is not defined #165

@PlaidTactician

Description

@PlaidTactician

I get this error when using angular-formio: 2.0.0-alpha.2 in angular 6.0.0-rc.4.

Uncaught ReferenceError: global is not defined at Object../node_modules/formiojs/lib/formio.js (formio.js:1382) at __webpack_require__ (bootstrap:74) at Object../node_modules/formiojs/lib/formio.form.js (formio.form.js:23) at __webpack_require__ (bootstrap:74) at Object../node_modules/formiojs/lib/index.js (index.js:8) at __webpack_require__ (bootstrap:74) at Object../node_modules/angular-formio/formio.service.js (formio.service.js:1) at __webpack_require__ (bootstrap:74) at Object../node_modules/angular-formio/index.js (formio.service.js:112) at __webpack_require__ (bootstrap:74) at Object../src/app/app.module.ts (app.component.ts:8) at __webpack_require__ (bootstrap:74) at Object../src/main.ts (environment.ts:17) at __webpack_require__ (bootstrap:74) at Object.0 (main.ts:14) at __webpack_require__ (bootstrap:74) at checkDeferredModules (bootstrap:43) at Array.webpackJsonpCallback [as push] (bootstrap:30) at main.js:1 15:56:27.559

This is the line it points to:
// Support ES5 require and globals. module.exports = global.Formio = Formio; exports.default = Formio;

If you try to reproduce make sure to change
import { Observable} from 'rxjs/Observable'
to
import { Observable} from 'rxjs'.

Thanks

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