node.js - Error: Object.assign is not a function. How to solve it?
phpcn_u1582
phpcn_u1582 2017-07-06 10:36:27
0
2
1277

1, index.html code

2. Entry app.js code

3. Error message

Error: Uncaught TypeError: Object.assign is not a function
How to solve it?

phpcn_u1582
phpcn_u1582

reply all(2)
为情所困

Your browser is too old and does not support this method. Object.assign seems to be a method only available in es6. Solution: introduce babel/ployfill

$ npm install babel-core --save-dev
import 'babel-core/polyfill'
女神的闺蜜爱上我

You can refer to this:
http://babeljs.io/docs/usage/...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!