question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

doesn't work with angular 8

See original GitHub issue

Describe the bug develop your application run ng build and see the error below. It only fails when compiling. I migrated from angular 7 to 8.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information): Angular 8

Additional context Add any other context about the problem here.

:8080/vendor-es2015.js:180795 Uncaught ReferenceError: process is not defined
    at Object../node_modules/aws-sdk/lib/browser_loader.js (:8080/vendor-es2015.js:180795)
    at __webpack_require__ (:8080/runtime-es2015.js:79)
    at Object../node_modules/aws-sdk/browser.js (:8080/vendor-es2015.js:179691)
    at __webpack_require__ (:8080/runtime-es2015.js:79)
    at Object../node_modules/@aws-amplify/core/lib/Facet.js (:8080/vendor-es2015.js:160462)
    at __webpack_require__ (:8080/runtime-es2015.js:79)
    at Object../node_modules/@aws-amplify/core/lib/index.js (:8080/vendor-es2015.js:162463)
    at __webpack_require__ (:8080/runtime-es2015.js:79)
    at Object../node_modules/@aws-amplify/auth/lib/Auth.js (:8080/vendor-es2015.js:156332)
    at __webpack_require__ (:8080/runtime-es2015.js:79)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:8
  • Comments:28 (1 by maintainers)

github_iconTop GitHub Comments

8reactions
gerrytsuicommented, May 31, 2019

OK. I found a way to properly Polyfill the “process is not defined”

npm install -S process

the add the following to your polyfills.ts

import * as process from ‘process’; window[‘process’] = process;

and set tsconfig.json

"target": "es2015",
7reactions
miiihicommented, Jul 12, 2019

Solved with adding following to polyfills.ts

// window.process needed by aws-amplify
(window as any).process = { browser: true };

as this is the same definition as aws browser loader tries to apply but fails because of undefined process. see aws-sdk/lib/browser_loader.js:L35

if (typeof process === 'undefined') {
  process = {
    browser: true
  };
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Method some() doesn't work as expected in Angular 8
I'm using some() method for this purposes but it doesn't work. It shows me that isFollowed flag is undefined although it should show...
Read more >
Top 18 Most Common AngularJS Developer Mistakes - Toptal
Some developers claim that 8 is a good number, but use an online calculator and suit yourself; check compatibility with older browsers; I...
Read more >
Server-side rendering (SSR) with Angular Universal
This guide describes Angular Universal, a technology that renders Angular applications on the server. A normal Angular application executes in the browser, ...
Read more >
Upgrading from AngularJS to Angular
One of the keys to a successful upgrade is to do it incrementally, by running the two frameworks side by side in the...
Read more >
TypeScript configuration - Angular
You don't need to do anything to get typings files for library packages that ... For instance, to install typings for chai you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found