question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Module BrowserSync is not available! You either misspelled the module name [...]

See original GitHub issue

Issue details

I am trying to use browser-sync inside a ghost template so I can reload the browser when changes have been made. When I navigate to localhost:3001, I can see the UI skeleton without any data (still in loading state): grafik

When I look into the console (of the browser-sync UI at port 3001), I can see these errors, what did I do wrong? grafik I’ll attach the errors in text form at the end of this issue.

Steps to reproduce/test case

I am simply using

browserSync.init({
  proxy: "localhost:2368",
});

in my gulp file and I tried browser-sync versions 2.27.4, 2.27.1 and 2.26 (with no success).

Please specify which version of Browsersync, node and npm you’re running

  • Browsersync [2.27.4, 2.27.1, 2.26]
  • Node [12.22.1]
  • Npm [6.14.12]

Affected platforms

  • windows

Browsersync use-case

  • Gulp
const browserSync = require("browser-sync").create();
browserSync.init({
  proxy: "localhost:2368",
});

and then browserSync.stream() at some places but this shouldn’t be related to the problem at hand.

Angular error in textform:

Uncaught TypeError: e.lowercase is not a function
    Angular 3
    Webpack 5
angular-sanitize.js:265:32
Uncaught Error: [$injector:nomod] Module 'BrowserSync' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
https://errors.angularjs.org/1.8.2/$injector/nomod?p0=BrowserSync
    Angular 4
    <anonymous> pages-config.js:6
    <anonymous> pages-config.js:134
angular.js:138:11
Uncaught Error: [$injector:nomod] Module 'BrowserSync' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
https://errors.angularjs.org/1.8.2/$injector/nomod?p0=BrowserSync
    Angular 4
    <anonymous> client-js.js:6
    <anonymous> client-js.js:94
angular.js:138:11
Uncaught Error: [$injector:modulerr] Failed to instantiate module BrowserSync due to:
[$injector:nomod] Module 'BrowserSync' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.

https://errors.angularjs.org/1.8.2/$injector/modulerr?p0=Bro…0http%3A%2F%2Flocalhost%3A3001%2Fjs%2Fapp.js%3A2%3A272529%0A
    Angular 15
    Webpack 5

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:8
  • Comments:21 (2 by maintainers)

github_iconTop GitHub Comments

10reactions
ronilaukkarinencommented, Dec 17, 2021

Only workaround for now:

npm install browser-sync@2.23.6 --save-dev
8reactions
dodaydreamcommented, Dec 16, 2021

I am also getting this issue on browser-sync 2.27.7 and node 17.2.0, browser-sync-webpack-plugin 2.3.0

I’m using browser-sync via laravel-mix 6.0.25

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: Cannot find module 'browser-sync' - Stack Overflow
To do that,. cd into the project directory and run npm install . Then try gulp serve . You can also try following...
Read more >
Easy Fix to a Common Angular Module Error - John Papa
"[$injector:nomod] Module 'ngLocale' is not available! You either misspelled the module name or forgot to load it. If registering a module ...
Read more >
Browsersync options
Browsersync makes your browser testing workflow faster by synchronising URLs, interactions and code changes across multiple devices.
Read more >
Uncaught Error: [$Injector:Nomod] Module Unavailable
Uncaught Error: [injector:nomod] Module 'app.layout' is not available! You either misspelled the module name or forgot to load it. If registering a module....
Read more >
تويتر \ #browsersync - البحث في تويتر - Twitter
Module 'BrowserSync' is not available! You either misspelled the module name or forgot to load it. This is because angular deprecated `toLowerCase` function ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found