Comments (9)
@willpmartin What were the actual steps that solved this for you?
from headless-wp-starter.
@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.
Sorted now, started over and everything seemed to work ok! thanks @krichdev @ginatrapani @jrdubina for your help!
from headless-wp-starter.
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.
Does your package.json have "start": "wp server" in the scripts section?
from headless-wp-starter.
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.
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.
@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.
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)
- Sub navigation? HOT 1
- functions acf_register_block_type and acf_register_block do not exist
- wp-headless container: No such file or directory HOT 1
- Nonce doesn't work for draft previews HOT 1
- Errors popping up while installing since wordpress 5.3
- Errors installing Windows 10 LTSC HOT 11
- Changed current directory to /var/www/.composer error
- faild to build wp-headless : Permission denied HOT 1
- How to deploy it on server?
- CORS errors HOT 1
- Which frontend if SEO is important HOT 1
- No Schema Available HOT 2
- Multisite setup - SSR wpapi connection issue
- Is there a complete guide from A to Z how to setup this repo INCLUDING details like setting up the users node and www-data? HOT 1
- Getting a rest_post_invalid_id when i try to visit wp-admin
- [meta]: Project status? HOT 1
- wp-headless: permission denied
- How can I make a PR? HOT 2
- Error loading Requests.php file in WordPress Docker container
- Docker compose ERROR HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from headless-wp-starter.