fix: faust tutorial with faust not defined error#2087
Merged
moonmeister merged 3 commits intocanaryfrom Mar 26, 2025
Merged
Conversation
Issue whereby some users are missing the first line of next.config.js
… issue with the first line of code being removed when running npx.
|
Contributor
📦 Next.js Bundle Analysis for @faustwp/getting-started-exampleThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
moonmeister
approved these changes
Mar 26, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tasks
Description
Fixes #2073
A very odd issue with when you run the code below, the first line of the next.config.js is missing so you get an error saying
withFaust is not defined...as the first lineconst { withFaust, getWpHostname } = require('@faustwp/core');is removed.The fix was to switch the first two lines around as I think maybe when we install npm packages, the first line above
createSecureHeadersis being removed.Related Issue(s):
#2073
Testing
npx create-next-app \ -e https://github.com/wpengine/faustjs/tree/bug/fix-faust-tutorial-with-faust-not-defined \ --example-path examples/next/tutorial \ --use-npmand then output the file
Followed the rest of the tutorial and I was able to get
npm run devto work - https://faustjs.org/docs/tutorial/learn-faust/Screenshots