-
Notifications
You must be signed in to change notification settings - Fork 755
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
Regression bug: Angular version not compatible with project #1917
Comments
+1 for this issue. |
TLDR; Angular Module Packages need to be upgradedangular-sanitize, angular-route, and angular-touch in the browser-sync-ui package need to be upgraded to version 1.8.2 because the 1.4.8 versions are not compatible with angular 1.8.2. More details below. I have a Gulp + browser-sync + npm setup as well. I noticed a few things in regards to this error.
If you look at the pre-transpiled app.js file causing problems it is requiring the old modules to use with a newer version of angular. I think the problem is that angular-sanitize@~1.4.8 depends on the lowercase method in angular@~1.4.8. angular-sanitize was updated at some point to use the private accessor $$lowercase. I cloned the repository and did the following commands to update those packages, install and build and it's working for me. note: building fails for me on windows, this was done on wsl2 Ubuntu@20.04 #bash console example
#Clone the Repository
foo@bar:~/source/repos$ git clone https://github.com/BrowserSync/browser-sync.git
#cd to browser-sync-ui package
foo@bar:~/source/repos$ cd ./browser-sync/packages/browser-sync-ui
#update package.json devDependencies with a text editor
foo@bar:~/source/repos/browser-sync/packages/browser-sync-ui$ vim package.json
#"angular-sanitize": "^1.8.2",
#"angular-touch": "^1.8.2",
#"angular-route": "^1.8.2",
#cd back into the repository root, install packages and build
foo@bar:~/source/repos/browser-sync/packages/browser-sync-ui$ cd ../..
foo@bar:~/source/repos/browser-sync$ npm install
foo@bar:~/source/repos/browser-sync$ npm run-script build I hope this helps. @mrwigster If you want to quickly and temporarily fix browser-sync-ui you can patch it with patch-package - The error occurs in the file path/to/your/project/node_modules/browser-sync-ui/public/js/app.js it's a mess to read it but if you search $$lowercase: you should be able to find the angular's api exposure, (an object hash). Add a lowercase property to the object and then assign it the same value that $$lowercase is assigned to. // browser-sync-ui/public/js/app.js
{
//several other api exposures
$$lowercase:x,
lowercase:x, // <- add this
//several more api exposures
} Once the fix is made for browser-sync, patch-package should be able to notify you about updates made to that file and then you can get rid of the temporary fix. Edited - 11/17/2021 |
Fixed in |
Details
It was before: #1885
Moment of error
This commit introduce regression: d0c9c4c
Solution
This is answer to problem: https://stackoverflow.com/a/50448475/5768332
Affected version:
I found out now and details are on screen:
Tested and working:
All automation failed to catch error in few minor version.
The text was updated successfully, but these errors were encountered: