Characters added to url when using browser-sync

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Characters added to url when using browser-sync

Postby jmikrut » 05. July 2022 23:44

I have a WordPress dev installation and I am trying to run automation with browser-sync. The url that should come up is localhost:3000/bbh/. What is coming up is localhost/%27bbh/%27. The automation is started with npm run preview. I'm relatively new and have no idea how to fix this.

This Brad Schiff boilerplate code. All I did was substitue my domain 'bbh' in the "sync" script.

My WordPress installation is in htdocs/bbh

Here are the scripts.
Code: Select all
"scripts": {
    "preview": "npm-run-all --parallel sync wpstart tailwindwatch",
    "sync": "browser-sync start -p 'bbh' --files '**/*.php' 'build/*.js' 'build/*.css'",
    "buildwp": "wp-scripts build",
    "build": "npm-run-all --sequential buildwp tailwindbuild",
    "wpstart": "wp-scripts start",
    "start": "npm-run-all --parallel wpstart tailwindwatch",
    "tailwindbuild": "tailwindcss -i ./src/index.css -o ./build/index.css --minify",
    "tailwindwatch": "tailwindcss -i ./src/index.css -o ./build/index.css --watch --minify",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
jmikrut
 
Posts: 2
Joined: 05. July 2022 23:33
XAMPP version: 8.1.2
Operating System: Windows 10 Home

Re: Characters added to url when using browser-sync

Postby jmikrut » 08. July 2022 02:51

I did solve the %27 problem. Switching the ' to " and putting a \ before solved it. I also had to add localhost (i.e. \"localhost/bbh/\"). It now spins up the web site and automatically refreshes.
jmikrut
 
Posts: 2
Joined: 05. July 2022 23:33
XAMPP version: 8.1.2
Operating System: Windows 10 Home

Re: Characters added to url when using browser-sync

Postby richardferrym » 12. March 2023 04:42

nice, i have also this problem
Sent from Android 15 Vanilla Ice Cream
richardferrym
 
Posts: 5
Joined: 09. March 2023 05:19
XAMPP version: 8.2.0
Operating System: Windows 11


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 130 guests