React-snap: Error when building : SyntaxError: Unexpected token ...

Created on 9 Apr 2018  路  6Comments  路  Source: stereobooster/react-snap

Hello, thanks for this tool !

My issue :

I added the "postbuild":"react-snap" correctly in package.json.

When trying to build my app (built with react-boilerplate) with react-snap : I get this error :

> [email protected] postbuild /home/louis/scotland2018
> react-snap

/home/louis/scotland2018/node_modules/react-snap/run.js:9
  ...reactSnap
  ^^^

SyntaxError: Unexpected token ...
    at createScript (vm.js:74:10)
    at Object.runInThisContext (vm.js:116:10)
    at Module._compile (module.js:533:28)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Function.Module.runMain (module.js:605:10)
    at startup (bootstrap_node.js:158:16)
    at bootstrap_node.js:575:3

Would you know why ?

Most helpful comment

there are no errors - this is just information log
馃暩- crawled page
鉁忥笍- console.log
鈿狅笍- warning, not critical. In this case 404 page title should contain "404" string
馃毀 - page skipped from crawling. In this case it is skipped, because this is pdf file

All 6 comments

You need node 8.6+

This is error in your application code. You should be able to see it when you open your application in the browser.

Ofc, my bad !

鉁忥笍  / log: JSHandle@error
馃暩  (1/7) /
鉁忥笍  /presentation log: 
馃暩  (2/8) /project
馃暩  (3/8) /teams
鈿狅笍  404 page title does not contain "404" string
馃暩  (4/8) /404.html
馃毀  skipping (5/8) /ca920535340fd37cbae476d78b23b915.pdf
馃暩  (6/8) /presentation
馃暩  (7/8) /charities
馃暩  (8/8) /partners

I think it succeeded ? But there are some errors ? Are those important ? How could I debug it ?

there are no errors - this is just information log
馃暩- crawled page
鉁忥笍- console.log
鈿狅笍- warning, not critical. In this case 404 page title should contain "404" string
馃毀 - page skipped from crawling. In this case it is skipped, because this is pdf file

Awesome Thanks ! Maybe worth putting it somewhere in the doc ? (or I missed it ? )

Yes documentation is somewhat behind. I have couple tickets about documentation, but do not have time at the moment

Was this page helpful?
0 / 5 - 0 ratings

Related issues

loganpowell picture loganpowell  路  9Comments

ShayanJavadi picture ShayanJavadi  路  5Comments

alan345 picture alan345  路  3Comments

lewisdonovan picture lewisdonovan  路  7Comments

lewisdonovan picture lewisdonovan  路  7Comments