node Issue in Creating demo project using react_on_rails gem

风流意气都作罢 提交于 2019-12-02 07:38:11

You're trying to use object destructuring, which was first supported in Node version 6, and is not available in Node 4.

You should upgrade your Node version, especially since version 4 is no longer actively maintained, which means that only critical fixes are applied, until it reaches the end of life (for details see LTS schedule).

If you still have to use Node 4, you cannot use object destructuring and have to change the line to:

const resolve = require('path').resolve;

Another possibility would be to transpile the unsupported features with Babel, but that seems a little heavy handed for a config.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!