question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Crawl failing with syntax error

See original GitHub issue

I seem to have run into a error which I can’t pinpoint the source of. I’m thinking that its some dependency issue.

My setup: Using create-react-app (react-scripts 0.9.5) Which uses jsdom 9.12.0, react and react-dom 15.4.2

Having this very basic example:

import React from 'react';
import {render} from 'react-snapshot';

const TestComponent = () => (
    <div><h1>Test</h1></div>
);

render(<TestComponent/>, document.querySelector('main'));

Which throws following error when running react-scripts build && react-snapshot: (paths shortened to start at project root)

Starting crawling http://localhost:2999 Error: Uncaught [SyntaxError: Unexpected token <] at reportException (…\node_modules\jsdom\lib\jsdom\living\helpers\runtime-script-errors.js:58:24) at processJavaScript (…\node_modules\jsdom\lib\jsdom\living\nodes\HTMLScriptElement-impl.js:130:7) at HTMLScriptElementImpl._eval (…\node_modules\jsdom\lib\jsdom\living\nodes\HTMLScriptElement-impl.js:65:7) at e (…\node_modules\jsdom\lib\jsdom\browser\resource-loader.js:31:22) at Object.check (…\node_modules\jsdom\lib\jsdom\living\nodes\Document-impl.js:89:11) at …\node_modules\jsdom\lib\jsdom\living\nodes\Document-impl.js:108:12 at wrappedEnqueued (…\node_modules\jsdom\lib\jsdom\browser\resource-loader.js:255:16) at Request.request [as _callback] (…\node_modules\jsdom\lib\jsdom\browser\resource-loader.js:203:9) at Request.self.callback (…\node_modules\request\request.js:188:22) at emitTwo (events.js:106:13) SyntaxError: Unexpected token < at Object.exports.runInContext (vm.js:66:16) at processJavaScript (…\node_modules\jsdom\lib\jsdom\living\nodes\HTMLScriptElement-impl.js:128:10) at HTMLScriptElementImpl._eval (…\node_modules\jsdom\lib\jsdom\living\nodes\HTMLScriptElement-impl.js:65:7) at e (…\node_modules\jsdom\lib\jsdom\browser\resource-loader.js:31:22) at Object.check (…\node_modules\jsdom\lib\jsdom\living\nodes\Document-impl.js:89:11) at …\node_modules\jsdom\lib\jsdom\living\nodes\Document-impl.js:108:12 at wrappedEnqueued (…\node_modules\jsdom\lib\jsdom\browser\resource-loader.js:255:16) at Request.request [as _callback] (…\node_modules\jsdom\lib\jsdom\browser\resource-loader.js:203:9) at Request.self.callback (…\node_modules\request\request.js:188:22) at emitTwo (events.js:106:13) ✏️ Saving / as /index.html � Finished crawling.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
kantenkugelcommented, Apr 22, 2017

that above PR from kevin looks much better than my ugly code and I also did a lot of other stuff for my personal use so i didn’t want to make a PR out of that directly. Wanted to see what the opinion on it is first.

0reactions
kantenkugelcommented, May 21, 2017

Closing issue as this is now implemented in 1.0.5-0. Would be nice to publish to npm tho as the npm registry still has 1.0.4 as its current version

Read more comments on GitHub >

github_iconTop Results From Across the Web

Search crawl - Top level Error - The crawler could not ...
Error 3 - Related to TRUST FAILURE in Crawl log: An unrecognized HTTP response was received when attempting to crawl this item.
Read more >
HTTP Status Codes - Why Won't My Website Crawl?
HTTP Status Codes Crawling With The Screaming Frog SEO Spider ... 500 – Internal Server Error / 502 – Bad Gateway / 503...
Read more >
robots.txt – The most common errors and how to avoid them
Error #1 – Use of incorrect syntax · Error #2 – Blocking path components instead of a directory (forgetting “/”) · Error #3...
Read more >
A Guide To Fixing Google Search Console Errors in 2022
Learn how to fix Google Search Console's most common errors such as Index Coverage, Mobile Usability, and Core Web Vitals reports, and more....
Read more >
Possible bug in scrapy 2.3.0 Invalid syntax async=False
I keep getting syntax error when I'm trying to run scrapy in AWS ubuntu 18.04 instance: scrapy crawl pcz -o px.csv. here's the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found