Giter Site home page Giter Site logo

Comments (9)

ginatrapani avatar ginatrapani commented on May 7, 2024

@ghoshnirmalya if you modify this line https://github.com/postlight/headless-wp-starter/blob/master/frontend/components/Header.js#L17 to add a / after main, and avoid that redirect, does it make a difference?

Also, just to confirm: is this Mac or Linux?

from headless-wp-starter.

ghoshnirmalya avatar ghoshnirmalya commented on May 7, 2024

@ginatrapani No change happens even if I add / after main.

I'm using Mac.

from headless-wp-starter.

ginatrapani avatar ginatrapani commented on May 7, 2024

I can't seem to reproduce this. Anyone else seeing it?

from headless-wp-starter.

johhansantana avatar johhansantana commented on May 7, 2024

weird, did you just cloned/download did yarn install && yarn start on wp server folder then went to ./frontend and did yarn install && yarn dev and it gave you this?

from headless-wp-starter.

ghoshnirmalya avatar ghoshnirmalya commented on May 7, 2024

@johhansantana Yes.

from headless-wp-starter.

ghoshnirmalya avatar ghoshnirmalya commented on May 7, 2024

Now, again I cloned the repo and followed the following steps:

  1. yarn install && yarn start
  2. cd frontend && yarn install && yarn start
  3. I log into the wp-admin and change the theme to Postlight Headless WordPress.

Now, when I go to http://localhost:3000/, I get the following:

maximum redirect reached at: http://localhost:8080/wp-json/
FetchError: maximum redirect reached at: http://localhost:8080/wp-json/
    at ClientRequest.<anonymous> (/Users/nirmalya/Development/personal/github/headless-wp-starter/frontend/node_modules/node-fetch/index.js:147:13)
    at emitOne (events.js:96:13)
    at ClientRequest.emit (events.js:188:7)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:473:21)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:99:23)
    at Socket.socketOnData (_http_client.js:362:20)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
    at Socket.Readable.push (_stream_readable.js:134:10)
    at TCP.onread (net.js:551:20)

and, when I go to http://localhost:8080/wp-json/, I get the following:

This page isn’t working

localhost redirected you too many times.
Try clearing your cookies.
ERR_TOO_MANY_REDIRECTS

from headless-wp-starter.

ginatrapani avatar ginatrapani commented on May 7, 2024

I log into the wp-admin and change the theme to Postlight Headless WordPress.

You shouldn't have to do this part, that should've happened during yarn install. Could you share the output of that command?

from headless-wp-starter.

ghoshnirmalya avatar ghoshnirmalya commented on May 7, 2024

This is the output:

yarn install v1.3.2
$ chmod +x install.sh && ./install.sh
Warning: homebrew/php/wp-cli 1.4.1 is already installed
Warning: homebrew/php/robo 1.1.1 is already installed
Warning: mysql 5.7.20 is already installed, it's just not linked.
You can use `brew link mysql` to link this version.
Starting MySQL
 SUCCESS!
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 143
Server version: 5.5.5-10.2.11-MariaDB Homebrew

Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> 171203 11:08:19 mysqld_safe A mysqld process already exists
exit
Bye
[1/4] πŸ”  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] πŸ”—  Linking dependencies...
[4/4] πŸ“ƒ  Building fresh packages...
success Saved lockfile.
$ robo wordpress:setup

 This will replace your current WordPress install. Are you sure you want to do this? (yes/no) [no]:
 >

✨  Done in 14.07s.

from headless-wp-starter.

ginatrapani avatar ginatrapani commented on May 7, 2024

Ah, the issue is this message:

Warning: mysql 5.7.20 is already installed, it's just not linked.
You can use brew link mysql to link this version.

See this comment:

#35 (comment)

from headless-wp-starter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.