-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setupProxy.js doesn't support Flow #5185
Comments
This is the expected behavior. This file runs in the Node environment and as such, only supports its syntax. |
I stumbled upon this issue #5185 because I was experiencing the exact same "Actual Behavior". What fixed things for me was changing my # setupProxy.js
import proxy from 'http-proxy-middleware';
export default function(app) {
app.use(proxy('/api', { target: 'http://localhost:5000/' }));
}; to this: # setupProxy.js
const proxy = require('http-proxy-middleware');
module.exports = function(app) {
app.use(proxy('/api', { target: 'http://localhost:5000/' }));
}; I'm commenting incase it saves someone else time in the future. |
@RodneyU215 that proxy seems pretty simple, does the normal |
Hi @Timer! Yes the normal |
Is this a bug report?
Yes.
Did you try recovering your dependencies?
Yes.
Which terms did you search for in User Guide?
"proxy" and "setupProxy"
Steps to Reproduce
make a
src/setupProxy.js
with Flow annotations (the ": *") like,run
yarn start
Expected Behavior
The usual dev server startup
Actual Behavior
The text was updated successfully, but these errors were encountered: