Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_global is not defined #2

Closed
davidlirving opened this issue Jul 17, 2017 · 1 comment
Closed

_global is not defined #2

davidlirving opened this issue Jul 17, 2017 · 1 comment
Labels

Comments

@davidlirving
Copy link
Collaborator

davidlirving commented Jul 17, 2017

Something to do with the Angular dependencies for PouchDB from my investigations. Application will compile but will not run in the browser, returning "ReferenceError: _global is not defined".

Removing db.service.ts from the application currently fixes the problem.

Valid since a bit before commit b71b928

Seems to be something wrong with the package dependency but it was working back since Wednesday on that same commit. Project was built on a separate device without issues from the aforementioned commit. Package dependencies are the same since then. npm update doesn't fix.

19:46:36.430 ReferenceError: _global is not defined[Learn More]  **polyfills.bundle.js:3891:17**
	makeAddListener/< http://localhost:4200/polyfills.bundle.js:3891:17
	attachBrowserEvents http://localhost:4200/vendor.bundle.js:3500:7
	Changes http://localhost:4200/vendor.bundle.js:3515:3
	../../../../pouchdb/lib/index-browser.es.js/< http://localhost:4200/vendor.bundle.js:7797:22
	../../../../pouchdb/lib/index-browser.es.js http://localhost:4200/vendor.bundle.js:2985:29
	__webpack_require__ http://localhost:4200/inline.bundle.js:55:12
	../../../../../src/app/db.service.ts http://localhost:4200/main.bundle.js:747:66
	__webpack_require__ http://localhost:4200/inline.bundle.js:55:12
	../../../../../src/app/data.service.ts http://localhost:4200/main.bundle.js:677:70
	__webpack_require__ http://localhost:4200/inline.bundle.js:55:12
	../../../../../src/app/app.component.ts http://localhost:4200/main.bundle.js:302:72
	__webpack_require__ http://localhost:4200/inline.bundle.js:55:12
	../../../../../src/app/app.module.ts http://localhost:4200/main.bundle.js:350:73
	__webpack_require__ http://localhost:4200/inline.bundle.js:55:12
	../../../../../src/main.ts http://localhost:4200/main.bundle.js:1485:74
	__webpack_require__ http://localhost:4200/inline.bundle.js:55:12
	[2] http://localhost:4200/main.bundle.js:1503:18
	__webpack_require__ http://localhost:4200/inline.bundle.js:55:12
	webpackJsonpCallback http://localhost:4200/inline.bundle.js:26:23
	<anonymous> http://localhost:4200/main.bundle.js:1:1```
@davidlirving
Copy link
Collaborator Author

Fixed in 37014dd

Issue caused by zone.js 0.8.13. Issue: angular/zone.js#835
For now using zone.js 0.8.12. Also using PouchDB 6.2.0 as there is a webpack import issue with 6.3.4.

Have frozen package.json to prevent this issue from re-occurring.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant