fix: faust tutorial with faust not defined error #2087
Merged
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