SyntaxError: Unexpected token ' { ' while starting the reactjs app in my terminal [duplicate]


SyntaxError: Unexpected token ' { ' while starting the reactjs app in my terminal [duplicate]



This question already has an answer here:



I tried to run existing clone reactjs app, the following error is accured in terminal,


SyntaxError: Unexpected token {
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:442:10)
at startup (node.js:136:18)
at node.js:966:3



Here my start.js coding from (myappname)/node_modules/react-scripts/scripts/start.js:31


start.js


(myappname)/node_modules/react-scripts/scripts/start.js:31


const {
choosePort,
createCompiler,
prepareProxy,
prepareUrls,
} = require('react-dev-utils/WebpackDevServerUtils');



Then how to solve this problem?



This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.





Which version of nodejs do you have ? (github.com/facebook/create-react-app/issues/2826)
– ADreNaLiNe-DJ
Jun 27 at 7:09





v4.2.6 @ADreNaLiNe-DJ
– Manoj A
Jun 27 at 7:12





You need at least v6.
– ADreNaLiNe-DJ
Jun 27 at 7:32





It's working while update my node version @ADreNaLiNe-DJ
– Manoj A
Jun 27 at 8:20




1 Answer
1



I updated nodejs version. it is working properly.


nodejs



we must contain nodejs version atleast v6.x.


v6.x

Comments

Popular posts from this blog

paramiko-expect timeout is happening after executing the command

Opening a url is failing in Swift

Export result set on Dbeaver to CSV