-2

I've transferred my app to my other laptop and getting this error in the console. Any idea why this is happening?

Uncaught ReferenceError: process is not defined at Object.../../node_modules/@babel/types/lib/definitions/core.js (vendor.js:133069) at webpack_require (runtime.js:85) at Object.../../node_modules/@babel/types/lib/definitions/index.js (vendor.js:135192) at webpack_require (runtime.js:85) at Object.../../node_modules/@babel/types/lib/builders/builder.js (vendor.js:130507) at webpack_require (runtime.js:85) at Object.../../node_modules/@babel/types/lib/builders/generated/index.js (vendor.js:130871) at webpack_require (runtime.js:85) at Object.../../node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js (vendor.js:137453) at webpack_require (runtime.js:85)

Nicholas K
  • 15,148
  • 7
  • 31
  • 57
integral100x
  • 332
  • 6
  • 20
  • 47

1 Answers1

5

Add this into index.html header and try

<script>
    //var global = global || window;//open this if you take global error
    //var Buffer = Buffer || [];//open this if you take buffer error
    var process = process || {
      env: { DEBUG: undefined },
      version: []
    };
  </script>
mr. pc_coder
  • 16,412
  • 3
  • 32
  • 54
  • Yes, that got rid of the error, but getting another error: core.js:6228 ERROR Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'quiz' Error: Cannot match any routes. URL Segment: 'quiz' at ApplyRedirects.noMatchError (router.js:4396) at CatchSubscriber.selector (router.js:4360) at CatchSubscriber.error (catchError.js:29) – integral100x Jun 06 '20 at 19:27
  • Did you try to upgrade version ? and when you transform to new pc are angular cli versions are same with past one ? – mr. pc_coder Jun 06 '20 at 19:32
  • I upgraded to latest version but then downgraded back to 9.0.4. – integral100x Jun 06 '20 at 19:34
  • Can you check this https://stackoverflow.com/questions/52028782/error-error-uncaught-in-promise-cannot-match-any-routes-url-segment for your error ? – mr. pc_coder Jun 06 '20 at 19:34
  • I was trying to use path alias in tsconfig, maybe that's why. – integral100x Jun 06 '20 at 19:35
  • When you directly try to open page from url , Is it working ? – mr. pc_coder Jun 06 '20 at 19:41
  • tried loading http://localhost:4200/quiz/intro but doesn't load – integral100x Jun 06 '20 at 19:44
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/215439/discussion-between-integral100x-and-pc-coder). – integral100x Jun 06 '20 at 19:51