Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react-snapshot crawl fails #15

Open
cezarneaga opened this issue Mar 21, 2017 · 8 comments
Open

react-snapshot crawl fails #15

cezarneaga opened this issue Mar 21, 2017 · 8 comments

Comments

@cezarneaga
Copy link

cezarneaga commented Mar 21, 2017

console error below.

Pushstate server started on port 2999

🕷   Starting crawling http://localhost:2999
TypeError: Parameter "url" must be a string, not object
    at Url.parse (url.js:81:11)
    at urlParse (url.js:75:5)
    at Url.resolve (url.js:646:29)
    at Object.urlResolve [as resolve] (url.js:642:40)
    at .../node_modules/react-snapshot/lib/Crawler.js:96:44
    at Array.forEach (native)
    at .../node_modules/react-snapshot/lib/Crawler.js:88:83
    at Array.forEach (native)
    at Crawler.extractNewLinks (.../node_modules/react-snapshot/lib/Crawler.js:86:36)
    at .../node_modules/react-snapshot/lib/Crawler.js:68:15

on now.sh i get this error:

at Url.parse (url.js:95:11)
>     at urlParse (url.js:89:5)
>     at Url.resolve (url.js:657:29)
>     at Object.urlResolve [as resolve] (url.js:653:40)
>     at /home/nowuser/src/node_modules/react-snapshot/lib/Crawler.js:96:44
>     at Array.forEach (native)
>     at /home/nowuser/src/node_modules/react-snapshot/lib/Crawler.js:88:83
>     at Array.forEach (native)
>     at Crawler.extractNewLinks (/home/nowuser/src/node_modules/react-snapshot/lib/Crawler.js:86:36)
>     at /home/nowuser/src/node_modules/react-snapshot/lib/Crawler.js:68:15

anyone got into this?
not sure what to try next

thanks

@cezarneaga
Copy link
Author

on further investigating, it seems it cannot work if you have anchors as links

@JulesAU
Copy link

JulesAU commented Mar 28, 2017

This worked for me:
JulesAU@1191635

@cezarneaga
Copy link
Author

nope. doesnt do it :)

@arnibarnason
Copy link

arnibarnason commented May 7, 2017

I changed some <a href="#"...> to <a...> in my code and that fixed it for me.

@cezarneaga
Copy link
Author

cezarneaga commented May 7, 2017

i need the links. mine are #services etc..

@bkeating
Copy link

bkeating commented May 11, 2017

I applied JulesAU/react-snapshot@1191635 and also removed all href="#" just in case. Im still getting held up with TypeError: Parameter "url" must be a string, not object. Is there a way I can turn on debug/verbose output to learn more?

🕷   Starting crawling http://localhost:2999
TypeError: Parameter "url" must be a string, not object
    at Url.parse (url.js:81:11)
    at urlParse (url.js:75:5)
    at Url.resolve (url.js:646:29)
    at Object.urlResolve [as resolve] (url.js:642:40)
    at .../node_modules/react-snapshot/lib/Crawler.js:96:44
    at Array.forEach (native)
    at .../node_modules/react-snapshot/lib/Crawler.js:88:83
    at Array.forEach (native)
    at Crawler.extractNewLinks (.../node_modules/react-snapshot/lib/Crawler.js:86:36)
    at .../node_modules/react-snapshot/lib/Crawler.js:68:15

Edit: Possibly react-bootstrap related? I removed my global <Nav /> (bootstrap component) and it progressed a little further that whats above. I'll keep poking.

@tedlin182
Copy link

Removing any # from the href resolved this issue for me. That seemed to be the main culprit

@geelen
Copy link
Owner

geelen commented May 24, 2017

Can you please try again with v1.1.0 released last night?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants