Giter Site home page Giter Site logo

Comments (9)

PolarisTLX avatar PolarisTLX commented on May 7, 2024 3

@willpmartin What were the actual steps that solved this for you?

from headless-wp-starter.

krichdev avatar krichdev commented on May 7, 2024 1

@willpmartin - I was having this same issue. I un-installed homebrew then reinstalled homebrew, then reinstalled yarn and re-ran the yarn start command and it worked.

I think just updating yarn to the current version will work as well lol, either yarn -v or npm install --global yarn

from headless-wp-starter.

willpmartin avatar willpmartin commented on May 7, 2024 1

Sorted now, started over and everything seemed to work ok! thanks @krichdev @ginatrapani @jrdubina for your help!

from headless-wp-starter.

RajneeshShukla avatar RajneeshShukla commented on May 7, 2024 1

try npm start.

https://github.com/react-community/create-react-native-app
Create React Native App has been merged with Expo CLI You can now use expo init to create your project

from headless-wp-starter.

jrdubina avatar jrdubina commented on May 7, 2024

Does your package.json have "start": "wp server" in the scripts section?

from headless-wp-starter.

willpmartin avatar willpmartin commented on May 7, 2024

Thanks for the reply.

Here is the contents of the package.json

{
"name": "headless-wp-starter",
"version": "1.0.0",
"repository": "[email protected]:postlight/headless-wp-starter.git",
"author": "Postlight",
"license": "UNLICENSED",
"private": true,
"scripts": {
"preinstall": "chmod +x install.sh && ./install.sh",
"postinstall": "robo wordpress:setup",
"start": "wp server"
}
}

from headless-wp-starter.

willpmartin avatar willpmartin commented on May 7, 2024

other package.json file

{
"name": "frontend",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"dev": "node server.js",
"build": "next build",
"start": "next start",
"start": "wp server",
"docker:build": "docker build -t frontend .",
"docker:clean": "docker rm -f frontend || true",
"docker:run": "docker run -p 3000:3000 --name frontend frontend",
"docker:stop": "docker stop frontend",
"docker:start": "docker start frontend && yarn run docker:logs",
"docker:logs": "docker logs -f frontend",
"deploy":
"yarn run docker:build && yarn run docker:clean && yarn run docker:run"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"express": "^4.16.2",
"isomorphic-unfetch": "^2.0.0",
"next": "latest",
"react": "^16.0.0"
},
"devDependencies": {
"autoprefixer": "7.1.5",
"babel-plugin-module-resolver": "^2.7.1",
"babel-plugin-wrap-in-js": "^1.1.0",
"glob": "^7.1.2",
"node-sass": "^4.4.0",
"normalize.css": "^7.0.0",
"postcss-easy-import": "^3.0.0",
"postcss-loader": "^2.0.7",
"raw-loader": "^0.5.1",
"react-dom": "^16.2.0",
"sass-loader": "^6.0.6",
"webpack": "^3.10.0"
}
}

from headless-wp-starter.

willpmartin avatar willpmartin commented on May 7, 2024

@krichdev Thanks for the reply.

I update yarn to v 1.6.0

Still getting the same error

yarn install && yarn start
yarn install v1.6.0
[1/4] πŸ” Resolving packages...
success Already up-to-date.
✨ Done in 0.77s.
yarn run v1.6.0
error Command "start" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

from headless-wp-starter.

ttstauss avatar ttstauss commented on May 7, 2024

Following the documentation I was finally able to get to the following message in my console:

[OK] Great. You can now log into WordPress at: http://localhost:8080/wp-admin (nedstark/winteriscoming)

However, when I go to the given url, I get a "This site can’t be reached localhost refused to connect." error message.

After some investigation, it seems like the documentation is missing the step to actually start the WordPress server (I do see see the wp-headless and db-headless containers in Docker.). Is that correct?

Following the discussion above, how does the following commit change the proposed solutions (where "start": "wp server" was removed from the root package.json file)?

d2fccc7#diff-b9cfc7f2cdf78a7f4b91a753d10865a2

I tried adding back "start": "wp server" to the root package.json file, but I get a new error:

Error: YIKES! It looks like you're running this as root. You probably meant to run
this as the user that your WordPress installation exists under.

If you REALLY mean to run this as root, we won't stop you, but just bear in mind
that any code on this site will then have full control of your server, making it quite DANGEROUS.

If you'd like to continue as root, please run this again, adding this flag:  --allow-root

If you'd like to run it as the user that this site is under, you can run the following
to become the respective user:
    sudo -u USER -i -- wp <command>

I'm a little new to this, so I apologize if I'm missing something obvious here. I can't seem to figure it out though. Let me know if I need to open a new issue too, since this one is technically closed.

Any help would be greatly appreciated.

Thanks!

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.