angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

ERROR ReferenceError: 'Proxy' is undefined

Open toneyavuz opened this issue 8 years ago • 4 comments

hello, not working ie and safari.

$ node -v v8.10.0

$ npm -v 5.8.0

$ ng -v Your global Angular CLI version (1.7.3) is greater than your local version (1.6.6). The local Angular CLI version is used.

To disable this warning use "ng set --global warnings.versionMismatch=false".

Angular CLI: 1.6.6 Node: 8.10.0 OS: win32 x64 Angular: 5.2.9 ... animations, common, compiler, compiler-cli, core, forms ... http, language-service, platform-browser ... platform-browser-dynamic, router

@angular/cli: 1.6.6 @angular-devkit/build-optimizer: 0.0.42 @angular-devkit/core: 0.0.29 @angular-devkit/schematics: 0.0.52 @ngtools/json-schema: 1.1.0 @ngtools/webpack: 1.9.6 @schematics/angular: 0.1.17 typescript: 2.6.2 webpack: 3.10.0

angular-ie-bug

Thank you in advance for your help.

toneyavuz avatar Apr 13 '18 14:04 toneyavuz

I assume the polyfills have nothing to do with the problem and are accidentally in the gif.

Are you trying to redirect to an internal backend system or an external service? What is the content of your proxy.conf.js? Be sure to xxx-out confidental information, if you post it.

When I got my proxy-configuration wrong, I had never a related message in the browser, always on the shell. Browser just showed a generic connection problem. But that may vary depending on the proxy, I'm no expert.

What's the request your app is sending? Maybe the Network-tab of you browser dev-tools have additional information.

Edit: The error in your browser is probably completely unrelated to your proxy settings in proxy.conf.js. You're using the library ng-http-interceptor which seems to rely on the JavaScript Proxy object. I don't know the library and I'm not sure, if it causes your problem.

Now the polyfills screenshot makes sense, but core-js states, that Proxy can't be polyfilled, see https://github.com/zloirock/core-js#missing-polyfills. However, the prerequisites of ng-http-interceptor request you to install the Chrome proxy-polyfill, which seems to be missing in your package.json.

According to caniuse.com Safari 11 supports the Proxy object. We don't know which version you tried.

Hope this helps on your further investigations.

msterba avatar Apr 13 '18 15:04 msterba

thank you @msterba . save my day :)

toneyavuz avatar Apr 16 '18 08:04 toneyavuz

Thanks @msterba, that was a very detailed and insightful post! I think that addresses the problem @bhenav was having so I'll close this issue. Thanks again!

filipesilva avatar Apr 16 '18 09:04 filipesilva

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.