Yup: IE11, error in toposort/node_modules/index.js

Created on 19 Jul 2018  路  9Comments  路  Source: jquense/yup

Using react: 16.4.1, typescript: 2.9.2, yup: 0.25.1.
Build of app cannot be rendered in IE11. It is caused by
throw new Error( 'Unknown node. There is an unknown node in the supplied edges.', );
on line 29 and
throw new Error( 'Found unknown node. Make sure to provided all involved nodes. Unknown node: ' + JSON.stringify(node), );
on line 53 in funciton toposort and visit in index.js.
Problem is comma in the error object. When the prettier is disabled and comma not added to object everything works fine.

Most helpful comment

I don't understand why this issue was closed. Adding polyfills is not always possible. Would it be possible to look into ways of fixing this? IE11 is officially supported for 5 more years.

All 9 comments

orry i'm not sure, we've not run into this issue on IE11, and without more info it's hard to troubleshoot

I also have this issue,

TypeError: Object doesn't support property or method 'from'

see attached screenshot

screenshot 2018-11-09 at 09 41 07

I'm using Yup with Formik but when I am using the validationSchema it's creating this issue

const validationSchema = Yup.object().shape({
   title: Yup.string().required('Required'),
   description: Yup.string().required('Required'),
   meta: Yup.string().required('Required'),
   push: this.state.push
    ? Yup.string().required('You must add text to send out')
     Yup.string()
});

If you need anything else to help you please let me know!

@jquense are we able to open this issue again?

@ThomasLarge looks like you need to add a polyfill for that to work:
PTAL at https://babeljs.io/docs/en/babel-polyfill or https://github.com/zloirock/core-js

@RusinovAnton Thanks, I will check this works and let you know!

@ThomasLarge polyfill fixed this for me as well

I don't see get this particular issue in SPFx 1.9.1. But recently I did receive
"TypeError: Object doesn't support property or method 'from'" exception in IE browser when I was using the super awesome 'Yup' validation module in my code. In order to fix this I had to include the following import.
import "core-js/es6/array";

So far this is the only polyfill I had to manually include. Hope Microsoft includes the above polyfill in newer versions of SPFx.

I will update here if in future I am forced to import additional polyfills manually.

@ThomasLarge looks like you need to add a polyfill for that to work:
PTAL at https://babeljs.io/docs/en/babel-polyfill or https://github.com/zloirock/core-js

Hi, do you know which polyfill specifically is required to resolve this issue?

@ThomasLarge looks like you need to add a polyfill for that to work:
PTAL at https://babeljs.io/docs/en/babel-polyfill or https://github.com/zloirock/core-js

Hi, do you know which polyfill specifically is required to resolve this issue?

For me the issue was fixed by adding "core-js/es6/array" polyfill.

I don't understand why this issue was closed. Adding polyfills is not always possible. Would it be possible to look into ways of fixing this? IE11 is officially supported for 5 more years.

Was this page helpful?
0 / 5 - 0 ratings