-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
sockjs-node (Not Found) #1472
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
Comments
I found the trouble, in this commit line 70, if remove |
versions 10 has the best correct sockjs path to dev serve from any host name. |
Umm, it should not work like that. What is |
@jkzing I try use baseUrl but it not work. in ver 10 I used absolute path to work with nginx
because need all request send to webpack dev server UPD: I try '/' baseUrl |
@mavajee you should not be mutating |
@yyx990803 Maybe we could check that and display the like of |
@Akryum that would be nice although it's a bit difficult to precisely detect that |
I guess OP's usage is like having a With a nginx config like: server {
listen 8082 default_server;
location / {
proxy_pass http://localhost:8080;
proxy_set_header Host $host;
}
} Then open In above case, current strategy to fix the socket url to '/sockjs-node' is not enough, maybe we need to fix it to 'http://localhost:8080/sockjs-node'. |
Thank you for answers. I will check it tomorrow. What if make '/sockjs-node' url same absolute dev server url. Anyway HMR and sockjs work only with dev server |
@jkzing, hi, now it work for me, but if i put to baseUrl absolute url, I have this (just incorrect display, but all work) vue.config.js
|
and about |
@mavajee Just FYI, if current historyApiFallback not works for you, you can still overwrite it in |
@jkzing, yes I did it, i think it comment will be helpful for you |
Sorry to bother you guys again with this. I'm finding a similar issue but I'm not so sure is related to this, so just in case I prefer to drop the comment here. This one comes when running
but the webpack dev server was opening in the hostname specified by the --host flag. In previous versions of vue-cli I was doing the same thing and I didn't got the same problem. I've got the suspicious that this comes because here:
But maybe I'm doing something wrong. Am I missing something? I'm suing webpak 4.12.0 which I believe that is the one that it get install when running |
@linguamatics-albert , It's actually a bug of As a work around, you can use |
I think this issue still happens if you have a path at the end of devServer.public:
I can get it to work if I remove
This fixes the sockjs-node not found error, however, now hot reload doesn't seem to be working. |
Also, this error only started occurring for me once I upgraded to vue cli 3 from 2. |
Never mind, I thought my above solution worked, but it looks like it doesn't. |
This error is still occuring. I'm working on a multi vue app project that is contained within an nginx layer. Whenever I try to upgrade one of the apps (all using vue-cli 3) to a newer version of the vue-cli, or run yarn upgrade on vue-cli or any of its plugins, this errors occurs. Any suggested fix? |
I used @srchulo's comment and added the following to my
I'm assuming this only occurs to the dev server and does not happen in production build? |
I'm having a kind of different problem. I'm using
Here is my vue.config.js: module.exports = {
baseUrl: 'http://localhost:8082/',
devServer: {
public: 'localhost:8082',
host: 'localhost',
port: 8082,
disableHostCheck: true,
headers: {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Headers': 'Origin, X-Requested-With, Content-Type, Accept'
}
}
} I spent 2 days searching in Google, but couldn't find anything useful. Any help? |
@amravazzi same here. |
In Ubuntu 18.04.03 Server Edition and with [email protected], I'm getting these error messages, when deploying my starting-page of webapp with vue.js: This is my vue.config.js file :
How to solve the problem? |
1 year later but I had trouble finding a solution too. And yours worked. Thanks! |
It worked |
I've got the same problem with @marcoippolito,I wanna know how did you solve this problem at last.@marcoippolito |
Version
3.0.0-beta.15
Reproduction link
https://jsfiddle.net/w0jg8bdr/
Steps to reproduce
Use with nginx
What is expected?
HMR working with nginx
What is actually happening?
I use 3 version of vue cli and nginx. And each vue app have different sockjs-node path.
vue cli 10 have path 0.0.0.0:8082/sockjs-node/*** and it's work
vue cli 12 have path http://localhost.com:8082/sockjs-node/*** and it's work to
vue cli 15 have path http://localhost.com/sockjs-node/*** and it's not work. How you can see port is missing
UPD. If i run app on 0.0.0.0:8082 without nginx all work fine
maybe this commit is the reason or this
It's bug or just I not correct config my app?
The text was updated successfully, but these errors were encountered: