2017-11-16 3 views
0

https://github.com/UdiliaInc/create-react-library에서 create-react-library를 복제했지만 시작할 수 없습니다.create-react-library가 npm start를 실행할 수 없습니다.

나는 편집을하지 않았다. npm을 설치 한 다음 npm을 시작했습니다. npm start를 실행하면 아래에서 설명한 것과 같은 오류가 발생합니다.

Nodejs npm scripts fail with "SyntaxError: Unexpected token {"

나는 나의 노드 버전을 확인하고는 5.3.0입니다. 이것이 일어날 수있는 다른 이유는 무엇입니까?

오류가

`[[email protected] create-react-library]$ npm start 

[email protected] start /home/clynch/git/create-react-library 
node scripts/start.js 

/home/clynch/git/create-react-library/scripts/start.js:23 
    const { choosePort, 
     ^

    SyntaxError: Unexpected token { 
     at exports.runInThisContext (vm.js:53:16) 
     at Module._compile (module.js:374:25) 
     at Object.Module._extensions..js (module.js:405:10) 
     at Module.load (module.js:344:32) 
     at Function.Module._load (module.js:301:12) 
     at Function.Module.runMain (module.js:430:10) 
     at startup (node.js:141:18) 
     at node.js:980:3 
    npm ERR! code ELIFECYCLE 
    npm ERR! errno 1 
    npm ERR! [email protected] start: `node scripts/start.js` 
    npm ERR! Exit status 1 
    npm ERR! 
    npm ERR! Failed at the [email protected] start script. 
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above. 

    npm ERR! A complete log of this run can be found in: 
    npm ERR!  /home/clynch/.npm/_logs/2017-11-16T21_05_24_465Z-debug.log 
    ` 

답변

1

당신은 6.12로 노드 버전을 업데이트하거나 7+ 참고로

, 확인해야합니다입니다 http://node.green/

관련 문제