-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Broken Proxy* #41
base: master
Are you sure you want to change the base?
Broken Proxy* #41
Conversation
//Just letting you know this proxy does not work anymore and I wondered if you had a fix? everytime I use it with current packages I get //this error "[1] When specified, "proxy" in package.json must be a string. //[1] Instead, the type of "proxy" was "object". //[1] Either remove "proxy" from package.json, or make it a string. //"
I found the fix and could add it to the repo First, install http-proxy-middleware using npm or Yarn: $ npm install http-proxy-middleware --save const proxy = require('http-proxy-middleware') module.exports = function(app) { "proxy": { const proxy = require('http-proxy-middleware') module.exports = function(app) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That error you received actually suggests that one of your dependencies was incorrectly updated. I still have my proxies set up this way and it works fine. I would suggest that you try deleting your package-lock file and running npm install again. I experienced the same when i tried manually updating my lock file. Also I'd say you should add your lock file to your ignore. Your project won't depends on it since those are all dependencies of your specified dependencies. Deleting this file isn't a good idea since it is pretty much the bread and butter of a react project, similar to a manifest file.
Welp, i decided i should read up on that link.. oops. Deleting the whole package for is still not something that should be done. |
The problem is after learning this great course, I went to build real world projects that needed updates for security and what I learned on failed thats why IT MUST BE UPDATED or at least share the link for newbies. I think deleting the whole package JSON is not the answer that was a type error when I went to delete my comment. I would be happy to share the updates and the correct settings as it took me awhile to figure out why this one worked and mine did not. Thanks for reading, I was just hoping you could put out a notice and update readers. I know it makes selling the course easy, but somethings had NPM issues that forced me to update to comply with OWASP 2018. Thanks love all the work you guys have been putting out. |
5b859eb
to
c619692
Compare
HERE is the Latest Fix Thanks for a Great Class I would Love to Update some of this
facebook/create-react-app#5103
//Just letting you know this proxy does not work anymore and I wondered if you had a fix? everytime I use it with current packages I get //this error "[1] When specified, "proxy" in package.json must be a string.
//[1] Instead, the type of "proxy" was "object".
//[1] Either remove "proxy" from package.json, or make it a string.
//"