-
-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. #12304
Comments
I stumbled on the same error when updating to node 18.0.0, it works normally with node 17.0.0. |
Workaround: set env |
Doesn't work. |
Getting this issue without configuring To reproduce:
You shall see the following logged in your terminal.
Configuration
|
Please can you try it with node@17.0.0 ? Since I have the same issue with node@18 but not with node@17, so I assumed it was a problem only with node@18. |
@Kais3rP Tried with
|
I don't know this code base so I could be way off. But it seems like it could be caused because
|
i just reproduced this one. environment is win10 , nodejs 16.15.1 |
same error, I don't know why, but it works . |
Does anyone have a workaround for this that doesn't require downgrading? |
@rexpan yeah that works, thanks! |
Did you find the answer to this? |
Seems to be a duplicate of - or at least related to - #11762 |
is it still not fixed? I am using react 18.2.0 and react-dom 18.2.0 with this line in my package.json Edit: |
I am getting the same behaviour. For me it was working on all my commits yesterday but today it fails with this error on the exact same commits.
The workaround mentioned works for me
Thanks @rexpan |
The issue seems to be occurring when you put
in the Configuring the proxy middleware manually works fine https://create-react-app.dev/docs/proxying-api-requests-in-development/#configuring-the-proxy-manually |
try removing the "proxy" key-value pair in your frontend's package.json. |
Even after creating setupProxy.js file it wasn't actually proxying. Digging deeper I found the root cause. |
Work with me. Thanks |
@JonathanSum const { createProxyMiddleware } = require('http-proxy-middleware'); module.exports = function(app) { |
Closes LiberTEM#1300 Apply fix from facebook/create-react-app#12304 (comment) setupProxy.js was already present
Попробуйте вместо localhost вставить 127.0.0.1 |
@ShuriginAleksey it'd be nice to keep conversation in a language that most people here can understand. Some translation services might help with that |
Replace Localhost with 127.0.0.1 in the package.json file. |
Closes #1300 Apply fix from facebook/create-react-app#12304 (comment) setupProxy.js was already present
Delete "proxy": "http://localhost:6000" from package.json. Install package http-proxy-middleware with command npm install http-proxy-middleware --save. Create a file setupProxy.js inside your src folder or the root of your folder. Add these lines inside: const { createProxyMiddleware } = require('http-proxy-middleware'); module.exports = function(app) { Now it will work .Well it worked for me :) |
I do same thing but i got sams error |
First i changed my package.json in my react project. I deleted the
It worked but another problem occurred. |
Describe the bug
I'm trying to access the Apis in my local server throug the react app and I got this issue:
Did you try recovering your dependencies?
8.3.1
Which terms did you search for in User Guide?
proxy in local environment
Environment
Steps to reproduce
(Write your steps here:)
setupProxy
and add this code:Expected behavior
The app should be started normally.
Actual behavior
I got this error:
The text was updated successfully, but these errors were encountered: