Faust App doesn't start when I run 'npm run dev'
Description
I'm very interested in building headless WP apps, but I can't quite get this to work. I'm following the tutorial below, but when I get to the "npm run dev" step around 39:20 it doesn't start my dev app.
I just see: warn - Your WordPress site is not running on https! warn - This is a security concern as all traffic with your secret key is in plain text. warn - Please make sure your production Faust app runs with a WordPress instance on https! info - Faust.js v3.0.3 info - Faust.js CLI v3.0.2
https://www.youtube.com/watch?v=CuqUR1CInCg
Steps to reproduce
Follow steps in this tutorial, which are basically: Add Faust and WGraphQL plugins to WordPress Install NPM Register Faust by adding Secret Key and app URL to env.local file Try to start the app using npm run dev
Additional context
No response
@faustwp/core Version
Faust.js v3.0.3
@faustwp/cli Version
Faust.js CLI v3.0.2
FaustWP Plugin Version
1.3.2
WordPress Version
6.6.1
Additional environment details
Windows 11 Running in a stack provided by LocalWP (localwp.com) on an NGINX server using PHP 8.1.29
Please confirm that you have searched existing issues in the repo.
- [X] Yes
when I get to the "npm run dev" step around 39:20 it doesn't start my dev app.
@JDGHHou what does happen at this step? can your provide more information on what you're seeing?/
I see this message in the terminal:
warn - Your WordPress site is not running on https! warn - This is a security concern as all traffic with your secret key is in plain text. warn - Please make sure your production Faust app runs with a WordPress instance on https! info - Faust.js v3.0.3 info - Faust.js CLI v3.0.2
Then when I try to access the application in a browser through its url, it comes back with a not found error because the application isn't running.
@JDGHHou if you wait a few more seconds does it show the app has started on localhost:3000?
Can you maybe share your package.json?
@JDGHHou usually you will see output after what you shared. For example:
info - Faust.js v3.1.0
info - Faust.js CLI v3.1.0
▲ Next.js 13.5.6
- Local: http://localhost:3000
- Environments: .env.local
- Experiments (use at your own risk):
· scrollRestoration
· isrMemoryCacheSize
· incrementalCacheHandlerPath
✓ Ready in 1249ms
Possibly you're not waiting long enough for the app to start?
Hi guys,
I too have same issues but not sure where is the issue and why the service is not starting.
{ "private": true, "scripts": { "dev": "faust dev", "build": "faust build", "generate": "faust generatePossibleTypes", "start": "faust start", "codegen": "graphql-codegen", "watch-codegen": "graphql-codegen -w" }, "dependencies": { "@apollo/client": "^3.10.5", "@faustwp/blocks": "^4.0.0", "@faustwp/cli": "^3.0.2", "@faustwp/core": "^3.0.1", "@wordpress/style-engine": "^2.4.0", "graphql": "^16.8.2", "next": "^14.2.4", "react": "^18.3.1", "react-dom": "^18.3.1" }, "devDependencies": { "@graphql-codegen/cli": "^5.0.2", "@graphql-codegen/client-preset": "^4.3.0", "@parcel/watcher": "^2.4.1", "@types/node": "^18.16.1", "@types/react": "^18.3.3", "autoprefixer": "^10.4.19", "concurrently": "^8.2.2", "postcss": "^8.4.40", "tailwindcss": "^3.4.7", "typescript": "^5.4.5" } }
Given the original report and follow up comments, this seems to be related to npm run dev being ran on Windows.
Can you try this out with Linux? (here is one possible way to try that)
Given the original report and follow up comments, this seems to be related to
npm run devbeing ran on Windows.Can you try this out with Linux? (here is one possible way to try that)
Does not work for me even on WSL. It worked for an older project I abandoned (not sure what faust/cli version i was using)
Now i can not get it working locally at all.
Im having the same issue, running npm run dev or npm run build, or even faust dev and faust build directly will output the versions and exit.
node v22.9.0 npm v10.8.3
{ "name": "@faustwp/getting-started-example", "private": true, "version": "0.1.0", "scripts": { "dev": "faust dev", "build": "faust build", "generate": "faust generatePossibleTypes", "stylesheet": "faust generateGlobalStylesheet", "start": "faust start" }, "dependencies": { "@apollo/client": "^3.10.4", "@faustwp/cli": "^3.1.0", "@faustwp/core": "^3.1.0", "@wordpress/base-styles": "^4.49.0", "@wordpress/block-library": "^7.19.0", "classnames": "^2.5.1", "graphql": "^16.8.1", "next": "^12.3.4", "react": "^17.0.2", "react-dom": "^17.0.2", "sass": "^1.77.3" }, "devDependencies": { "next-secure-headers": "^2.2.0" }, "engines": { "node": ">=18", "npm": ">=8" } }
Works totally fine on my macbook, only on windows does this issue persist
Ended up downgrading my node version to 16.15.1 and seems like it doesnt work on the latest node versions on windows.
I am facing the same issue. The local server never starts npm run dev
[email protected] dev npm run generate && concurrently "faust dev" "npm run watch-codegen"
[email protected] generate faust generatePossibleTypes
info - This project's possibleTypes schema has been updated! [1] [1] > [email protected] watch-codegen [1] > graphql-codegen -w [1] [1] [STARTED] Parse Configuration [1] [SUCCESS] Parse Configuration [1] [STARTED] Generate outputs [1] [STARTED] Generate to ./src/generated/ [1] [STARTED] Load GraphQL schemas [0] info - Faust.js v3.0.3 [0] info - Faust.js CLI v3.0.2 [0] faust dev exited with code 0 [1] [SUCCESS] Load GraphQL schemas [1] [STARTED] Load GraphQL documents [1] [SUCCESS] Load GraphQL documents [1] [STARTED] Generate [1] [SUCCESS] Generate [1] [SUCCESS] Generate to ./src/generated/ [1] [SUCCESS] Generate outputs [1] ℹ Watching for changes in I:\Dev\ncmaz-faust...
node --version v20.17.0
Windows 11 pro
npm --version 10.8.3
@jasonbahl the exact same app is running on mac without any issue
I downgraded the node and v21.5.0 worked v20.17.0 ❌️ v20.7 ❌️ v21.5.0 ✅️
Same issue, trying multiple node versions doesn't seem to fix it for me.
Any help? please? same issue for me
Use Node v21.5.0 ✅️ @jk2908 @omrishooshan
@omrishooshan, @jk2908, @sarkaramitabh300, @JDGHHou If you are using a Windows system, please use Node.js version 18.17, I also encountered the same issue with Node version 20.18.1, but after downgrading to version 18.17.1 in perfectly working in my Windows 11 system.
Also, you can check the Faust.js README.md file, which mentions: Node.js v16.0.0 or newer (v16.8.0 when using Next.js 13 and v18.17 when using Next.js 14).
still happen on
"@faustwp/cli": "^3.2.3",
"@faustwp/core": "^3.2.3",
must use node 21.5.0