Skip to content

JavaScript Error when using IE: Unable to get property 'apply' #150

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

Closed
AmrineA opened this issue Apr 4, 2017 · 8 comments
Closed

JavaScript Error when using IE: Unable to get property 'apply' #150

AmrineA opened this issue Apr 4, 2017 · 8 comments

Comments

@AmrineA
Copy link

AmrineA commented Apr 4, 2017

image
When trying to run the default application, I get the error seen above. Using Chrome, this error doesn't show. From the research I've done, it appears that .apply() is not available in IE and needs some sort of shim to work properly. I've tried some of the suggestions, but haven't been able to get it to work.

@MarkPieszak
Copy link
Member

MarkPieszak commented Apr 4, 2017

What version of IE?
I just made a major major update #151 (we now have AoT support and bunch of other things).

Can you wipe out the project and get latest?

Inside /Client/polyfills/ you'll see polyfills.ts this is similar to the one found in Angular-CLI for example.
You'll see some comments about providing shims for older browsers, you'd want to uncomment out a bunch of those core-js/** lines to get IE9-11 support.

Uncomment these ones:

/***************************************************************************************************
 * BROWSER POLYFILLS
 */

/** IE9, IE10 and IE11 requires all of the following polyfills. **/
import 'core-js/es6/symbol';
import 'core-js/es6/object';
import 'core-js/es6/function';
import 'core-js/es6/parse-int';
import 'core-js/es6/parse-float';
import 'core-js/es6/number';
import 'core-js/es6/math';
import 'core-js/es6/string';
import 'core-js/es6/date';
import 'core-js/es6/array';
import 'core-js/es6/regexp';
import 'core-js/es6/map';
import 'core-js/es6/set';

Hope that helps!

@AmrineA
Copy link
Author

AmrineA commented Apr 4, 2017

Thanks, I'll pull down the latest, take a look and report back.

@AmrineA
Copy link
Author

AmrineA commented Apr 4, 2017

I've pulled down the latest, uncommented those lines in polyfills and tried running it. I'm getting completely different errors now:
image
After hitting F5 a couple of times:
image
I forgot to mention that I was testing things in IE11 before. I noticed that the webpack.config.vendor.js is gone now. How does the vendor.js file get built or is that gone?

@MarkPieszak
Copy link
Member

It's gone now actually. I'll probably bring something similar back but it won't be so manual of a process.

Can you wipe out both the dist folders and do the below, just to see if anything is acting up?

npm run build:dev -- --verbose 

@rphilp
Copy link

rphilp commented Apr 4, 2017

I think the issue is that node-sass and sass-loader are missing from package.json. I just installed them and then it worked.

Just to confirm the fix for this issue. Removing the comments for the IE9-11 imports does work.

Next time slow down with the fixes. :)

@MarkPieszak
Copy link
Member

NgConf tomorrow 🙈🎁 had to get it ready and you're right I had those installed but not saved.
Want to make a quick PR to add them in the dependencies? @rphilp

@rphilp
Copy link

rphilp commented Apr 4, 2017

I believe I dropped the PR with the dependencies. First time doing that though so apologies if I messed it up.

@MarkPieszak
Copy link
Member

Don't see it @rphilp
It's ok I can add it in there

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

No branches or pull requests

3 participants