I'm currently building a Vue.js app using vue/cli-service#4.5.17.
The issue I'm having is that whenever I change a .vue file, the server does not recompile, restart, or do anything.
I use this command (through package.json) to run the server in development environment:
NODE_ENV=development vue-cli-service serve
My vue.config.js file is:
module.exports = {
devServer: {
host: 'localhost',
port: 8080,
hot: true
},
publicPath: '/'
}
This is the output, and it does not change if I edit a file while the server is running:
DONE Compiled successfully in 17169ms 12:01:45 PM
App running at:
- Local: http://localhost:8080/
- Network: http://localhost:8080/
Note that the development build is not optimized.
To create a production build, run npm run build.
EDIT: I would like to add that a friend who is working on the same project and who start the server the same way as I do has the expected watch/reload feature. Is there a hidden environment variable to set or something?
I also would like to add that I'm using WSL2 to start the development server.
Thanks for your help!
Ok, I found something.
This is an issue with WSL2 not being able to trigger file change notifications: https://github.com/microsoft/WSL/issues/4739 .
I tried using Vite and with adding:
server: {
watch: {
usePolling: true
}
}
To the vite.config.js, it does work properly with WSL2 as explained here.
I create a basic express app
const express = require('express');
const app = express();
app.get("*", (req, res) => {;
res.contentType('html');
res.send("HELLO FROM WSL");
});
const port = 80
app.listen(port);
Then I add following entrie in c:\windows\system32\drivers\etc\hosts
127.0.0.1 custom.local
Then I shutdown wsl wsl --shutdown and re-open to start my express app.
If I check hosts file from WSL (cat /etc/hosts), I got following result
# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
# [network]
# generateHosts = false
127.0.0.1 localhost
127.0.1.1 LAPTOP-ZECKA.localdomain LAPTOP-ZECKA
127.0.0.1 custom.local
Then I go to http://custom.local trough chome in windows. But it's doesn't display my express app. (If i run express on windows instead of wsl it's work well).
What's wrong on my hosts file ?
Finally I found a solution on github: https://github.com/microsoft/WSL/issues/5728#issuecomment-917295590
Instead declare domain like that
127.0.0.1 custom.local
I do as follow:
127.0.0.1 custom.local
::1 custom.local localhost
Previously, I had my WSL in version 1 and everything worked fine. Then I decided to upgrade to WSL 2 and - similar to many others - I lost internet connection. Thankfully, I could easily bring it back by running:
sudo bash -c 'echo "nameserver 8.8.8.8" > /etc/resolv.conf'
Apparently, it was just a DNS issue. I could live with that. However, then I restarted my WSL and the nameserver was set back to 172.31.208.1. So I decided to do exactly what was written in the comments in /etc/resolv.conf:
This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
[network]
generateResolvConf = false
And ran the following lines:
sudo bash -c 'echo "[network]" > /etc/wsl.conf'
sudo bash -c 'echo "generateResolvConf = false" >> /etc/wsl.conf'
I was proud that I resolved the issue so elegantly until I restarted my WSL again. Now, resolv.conf was in red and not accessible from Ubuntu. When I tried to access it from Windows, I saw just an empty file.
Expected behavior
After restarting WSL, resolv.conf keeps the user-defined values.
Actual behavior
After restarting WSL, resolv.conf is empty or not accessible at all.
If I want to connect cube.js to my own built redis, what should I do.
I use CUBEJS_REDIS_URL which is claimed by official document. So, for example, if my own redis port is 31.71.195.218.
Should I use write CUBEJS_REDIS_URL=redis://31.71.195.218:6379/0 in my backend .env file? I use many combination like, redis://31.71.195.218:6379, redis://31.71.195.218, ecc.
However, they all show the following error message:
process in uncaughtException: { Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED 127.0.0.1:6379
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1117:14)
errno: 'ECONNREFUSED',
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 6379 }
in my terminal. It seems that this environment variable CUBEJS_REDIS_URL isn't used.
I think cube.js doesn't use your configuration in DEV mode, Try setting CUBEJS_DEV_MODE=false in your env file
I think you need to pass the env variables into the Docker container. Please see this example in the documentation: https://cube.dev/docs/deployment/platforms/docker
I use brew to install polipo through Mac OS terminal. It seems successfully install, but I can not find the config file and edit it.Can anyone help me figure out the reason?
The config file will not be created automatically. You need to get sample config file. Run this command in Terminal:
curl -o ~/.polipo https://raw.githubusercontent.com/jech/polipo/master/config.sample
and for forbidden URLs:
curl -o ~/.polipo-forbidden https://raw.githubusercontent.com/jech/polipo/master/forbidden.sample
Then restart polipo to ensure that it will use the config file:
launchctl unload /usr/local/opt/polipo/homebrew.mxcl.polipo.plist
launchctl load /usr/local/opt/polipo/homebrew.mxcl.polipo.plist
If it produced Service is disabled error, try this command to restart polio:
brew services restart polipo
Now open this address in your browser:
http://127.0.0.1:8123/polipo/config
You should see this line at the top:
configFile /Users/YourUserName/.polipo Configuration file.
If so, you need to modify ~/.polipo to configure your polipo instance.
There is another way that is not recommended. You can make your config file at /usr/local/etc/polipo/config and then create soft link to /etc/polipo/config with these commands:
mkdir /usr/local/etc/polipo/
curl -o /usr/local/etc/polipo/config https://raw.githubusercontent.com/jech/polipo/master/config.sample
sudo ln -sfv /usr/local/etc/polipo/config /etc/polipo/config
Then restart polipo and ensure that your config file location is correct. You can modify config file at /usr/local/etc/polipo/config.
I also used the brew to install polipo on Mac OS. Same problem as you met.
In fact, you need create the config file. The fail's path is ~/.polipo.
After you start the polipo service(brew services start polipo)
Open the link: http://127.0.0.1:8123/polipo/config
This is my config:
socksParentProxy = "127.0.0.1:1086"
socksParentProxy
socksProxyType = socks5
proxyAddress = "::0" # both IPv4 and IPv6
proxyPort = 8123
If polipo does not work:
I wanted to install polipo too, but even with the configuration files provided here, I was getting:
Error: polipo has been disabled because it is not supported upstream!
(MacBook Pro M1 chip. My socks proxy was generated with ssh -D 8000 -C -N myuser#statichost because of some static IP requirement).
So, I found out that you can also use an npm package to convert socks proxy to http proxy: https://www.npmjs.com/package/http-proxy-to-socks
# install hpts:
npm install -g http-proxy-to-socks
# launch http proxy:
hpts -s 127.0.0.1:8000 -p 8001
# here my socks5 proxy is at 127.0.0.1:8000 and the http proxy is now on port 8001
Npm does not support socks5 proxies, for example. So I used hpts to get an http proxy. After, I told npm to use that proxy with:
npm config set proxy http://127.0.0.1:8001
npm config set https-proxy http://127.0.0.1:8001
Setting up a development environment with Ubuntu 14.04 running in VirtualBox, following this guide: http://klau.si/dev
After installing phpmyadmin, it seems I should be able to access it at http://localhost/phpmyadmin but apache returns a Not Found error. Did this guide leave out a configuration step somewhere? I have already tried restarting the apache service.
There is no phpmyadmin.conf file in apache2/sites-enabled or apache2/sites-available, is this required?
If so, where can I find these files?
using 127.0.0.1 instead of localhost returns the same error. The default apache page at http://localhost works just fine.
the console in the browser shows nothing of value, simply Not Found.
I have also tried rerunning the install script with dpkg-reconfigure -plow phpmyadmin
This issue was resolved thanks to this guide: https://help.ubuntu.com/community/ApacheMySQLPHP#Troubleshooting_Phpmyadmin_.26_mysql-workbench by adding
Include /etc/phpmyadmin/apache.conf
...to the /etc/apache2/apache2.conf file and restarting the service.
Try this
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
sudo a2enconf phpmyadmin.conf
sudo systemctl restart apache2
sudo dpkg-reconfigure -plow phpmyadmin
Select No when asked to reconfigure the database. Then when asked to choose apache2, make sure to hit space while [ ] apache2 is highlighted. An asterisk should appear between the brackets. Then hit Enter. Phpmyadmin should reconfigure and now http://localhost/phpmyadmin should work. for further detail https://www.howtoforge.com/installing-apache2-with-php5-and-mysql-support-on-ubuntu-13.04-lamp
The easiest way to do in ubuntu (I tested in ubuntu-20.04):
Step 1. Open the file:
sudo nano /etc/apache2/apache2.conf
Step 2: Add the following line at the end of file:
Include /etc/phpmyadmin/apache.conf
Step 3: Restart apache2:
sudo systemctl restart apache2.service
Create a link in /var/www like this:
sudo ln -s /usr/share/phpmyadmin /var/www/
Note: since 14.04 you may want to use /var/www/html/ instead of /var/www/
If that's not working for you, you need to include PHPMyAdmin inside apache configuration.
Open apache.conf using your favorite editor, mine is nano :)
sudo nano /etc/apache2/apache2.conf
Then add the following line:
Include /etc/phpmyadmin/apache.conf
For Ubuntu 15.04 and 16.04
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
sudo a2enconf phpmyadmin.conf
sudo service apache2 reload
Finally I got the solution
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
sudo a2enconf phpmyadmin
sudo service apache2 reload
More about
https://askubuntu.com/questions/55280/phpmyadmin-is-not-working-after-i-installed-it
Create a link in /var/www/html like this to fix the error:
sudo ln -s /usr/share/phpmyadmin /var/www/html
For anyone still running into issues with this- check that you're actually using apache! I knocked my head against this for 20 minutes or so before I remembered...I use NginX on this server...=). #john-smith, this one's for you buddy.
To get it working on nginx, all you should have to do is create a sim link and restart php:
sudo ln -s /usr/share/phpmyadmin /var/www/html
Note that for you, it may be /var/www/ and not /var/www/html, depending on your dir structure.
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
sudo ln -s /usr/share/phpmyadmin /var/www/html/phpmyadmin
sudo service apache2 restart
Run above commands issue will be resolved.
Run the following command in terminal:
sudo ln -s /usr/share/phpmyadmin /var/www/html/
It seems like sometime during the second half of 2018 many php packages such as php-mysql and phpmyadmin were removed or changed. I faced that same problem too. So you'll have to download it from another source or find out the new packages
You will need to configure your apache2.conf to make phpMyAdmin works.
sudo nano /etc/apache2/apache2.conf
Then add the following line to the end of the file.
Include /etc/phpmyadmin/apache.conf
Then restart apache
sudo service apache2 restart
I had the same issue where these fixes didn't work.
I'm on Ubuntu 20.04 using hestiaCP with Nginx.
Today after adding
Include /etc/phpmyadmin/apache.conf
into both Apache and Nginx, Nginx failed to restart. It was having an issue with "proxy_buffers" value.
Yesterday I had to modify the Nginx config to add and increase these values so Magento 2.4 would run. Today I altered "proxy_buffers" again
proxy_buffers 3 64k;
proxy_buffer_size 128k;
proxy_busy_buffers_size 128k;
After the second alteration and the removal of "Include /etc/phpmyadmin/apache.conf" from both Apache and Nginx, Magento 2.4 and PHPMyAdmin are working as expected.
I didn't try Rashmi Jain's symlink answer. It seems like it would work. But if it doesn't work for you, perhaps try this.
I just created the file `/etc/apache2/conf-available/phpmyadmin.conf' and added this line to it:
Include /etc/phpmyadmin/apache.conf
(rather than putting it into /etc/apache2/apache2.conf as in Anonymous Man's answer)
Then:
sudo a2enconf phpmyadmin
sudo systemctl reload apache2
I had the same problem after installing mysql, apache2, php and finally phpmyadmin after each other. In my case it was solved by restarting apache2 (no need to update any configuration file):
sudo systemctl restart apache2
#John smith, I was facing the same issue of not being able to access phpmyadmin for 3 days, I found the solution.
-- Get xampp, check this tutorial https://youtu.be/VHfij95yOpo
-- Run this command before starting xampp app
sudo /etc/init.d/apache2 stop
sudo service mysql stop
That's it, it worked for me
first go to the location of phpmyadmin via terminal then type this
code php -S localhost:8001
First check PhpMyAdmin is install or not. If it is installed then search PhpMyadmin folder. After search cut and paste that folder in location Computer->var->www->html->paste folder. Open browser and type localhost/phpMyAdmin and login using username and password.
If you are having this problem in 2019, go to your 000-default.conf file, by typing this subl /etc/apache2/sites-enabled/000-default.conf (in your terminal to open the file in sublime editor)
When the file loads, locate "The ServerName directive sets the request scheme" and place this "Include /etc/phpmyadmin/apache.conf" on top .
Then restart your apache with the command...service apache2 restart That will certainly fix the issue. Hope it helps!