This is my version of nodejs: 6.17.1 and sequelize 6.4.0. I folow this: https://bezkoder.com/react-node-express-mysql/. And I got error:
> /app/nodejs/node_modules/sequelize/lib/sequelize.js:277
> ...options
> SyntaxError: Unexpected token ...
> at createScript (vm.js:56:10)
> at Object.runInThisContext (vm.js:97:10)
> at Module._compile (module.js:549:28)
> at Object.Module._extensions..js (module.js:586:10)
> at Module.load (module.js:494:32)
> at tryModuleLoad (module.js:453:12)
> at Function.Module._load (module.js:445:3)
> at Module.require (module.js:504:17)
> at require (internal/module.js:20:19)
> at Object.<anonymous> (/app/nodejs/node_modules/sequelize/index.js:8:18)
So am I wrong something ?
Solved with this code:
+ sudo yum install nodejs
+ node --version
+ npm --version
+ which node
+ which npm
+ curl -sL https://rpm.nodesource.com/setup_12.x | bash -
+ ls -la /etc/yum.repos.d/|grep nodesource
+ sudo yum remove -y nodejs npm
+ sudo yum list available nodejs
+ sudo yum install nodejs
+ node --version
+ npm --version
The spread operator (...) is not supported by your node version. You need version above 8.6.
follow this link, to find out specific support methods in node, https://node.green/#ES2015
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments