I am a beginner in AngularJs & while I am trying to install Angular Material Icon using bower, I am getting ENOTFOUND Package save not found Error.
I am using this command
bower install save angular-material-icons
These are my dependencies
"dependencies": {
"angular": "~1.5.8",
"angular-animate": "~1.5.8",
"angular-messages": "~1.5.8",
"angular-touch": "~1.5.8",
"angular-aria": "~1.5.8",
"angular-resource": "~1.5.8",
"angular-material": "^1.1.1",
"moment": "~2.10.6",
"angular-sanitize": "~1.5.8",
"angular-ui-router": "^0.3.1",
"material-design-icons-iconfont": "^3.0.0",
"google-open-sans": "^1.0.0",
"angular-route": "1.5.8",
"ngstorage": "^0.3.11",
"smDateTimeRangePicker": "^1.6.1",
"ng-intl-tel-input": "^2.0.0",
"angular-youtube-mb": "^1.3.1",
"leaflet": "^1.0.2",
"md-data-table": "^2.2.0"
}
Please Suggest If Anyone Faced the similar problem.
I'm not bower expert, but I'm pretty sure that you should use save parameter this way:
bower install angular-material-icons --save
Related
I'm attempting to upgrade my NextJS project from Material UI v4 to v5 using the official guide: https://mui.com/guides/migration-v4/
After following all the steps, when I start the server I get the following error in my console:
Module not found: Can't resolve 'react'
Import trace for requested module:
./../node_modules/#emotion/react/dist/emotion-react.browser.esm.js
./../node_modules/#mui/styled-engine/index.js
./../node_modules/#mui/system/esm/index.js
./../node_modules/#mui/core/Popper/Popper.js
./../node_modules/#mui/core/Popper/index.js
./../node_modules/#mui/core/index.js
./../node_modules/#mui/material/utils/index.js
./../node_modules/#mui/icons-material/utils/createSvgIcon.js
./../node_modules/#mui/icons-material/Menu.js
./components/global/LodAppBar.jsx
./pages/_app.jsx
I've tried deleting my node_modules folder and installing all modules fresh with no luck. I've ensured all of the #material-ui packages have been removed from my package.json file as well. These are my dependencies from package.json:
"dependencies": {
"#auth0/auth0-react": "^1.4.0",
"#date-io/date-fns": "^1.3.13",
"#emotion/react": "^11.5.0",
"#emotion/styled": "^11.3.0",
"#mui/material": "^5.0.6",
"#mui/styles": "^5.0.2",
"#sentry/react": "^6.11.0",
"#sentry/tracing": "^6.11.0",
"babel-preset-next": "^1.4.0",
"d3": "7.1.1",
"date-fns": "^2.20.2",
"date-fns-timezone": "0.1.4",
"dotenv": "^8.2.0",
"formik": "^2.2.6",
"logrocket": "^2.0.0",
"logrocket-react": "^4.0.1",
"luxon": "^1.26.0",
"next": "^11.1.1",
"next-optimized-images": "^2.6.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-swipeable-views": "^0.13.9"
},
The dependencies you provided works (at least on my machine). Try deleting yarn.lock and package-lock.json and do a fresh install again to update your packages to the newer versions.
We have a web application on AngularJS 1.x which is creating issues with dependencies -> dependent library to raven scan vulnerabilities.
Package.json:
{
"name": "Test",
"dependencies": {
"angular": "1.6.9",
"angular-animate": "1.6.6",
"angular-aria": "1.6.9",
"angular-material": "1.1.9",
"angular-messages": "1.6.9",
"angular-route": "1.6.9",
"angular-touch": "1.6.9",
"angular-ui-router": "0.3.2",
"angular-smart-table": "2.1.8",
"angular-ui-bootstrap": "1.3.3",
"angular-ui-grid": "4.8.3",
"angular-ui-select": "0.12.10",
"uuid": "^3.3.2",
"bootstrap": "3.3.7",
"requirejs": "2.3.6",
"jquery": "3.3.1",
"grunt-cli": "1.3.2",
"grunt": "1.3.0",
"grunt-contrib-uglify": "4.0.1",
"grunt-contrib-jshint": "2.1.0",
"grunt-contrib-requirejs": "1.0.0",
"grunt-contrib-clean": "1.1.0",
"grunt-contrib-copy": "1.0.0",
"grunt-contrib-cssmin": "2.2.1",
"grunt-contrib-concat": "1.0.1",
"grunt-processhtml": "0.4.2",
"grunt-front-end-modules": "1.1.0",
"grunt-karma": "3.0.0",
"underscore": "1.8.3",
"d3": "3.5.17",
"nvd3": "1.8.1",
"angular-file-saver": "1.1.3",
"smart-area": "2.0.0",
"csv-js": "1.0.0",
"pdfmake": "0.1.36",
"file-saver": "1.3.2",
"font-awesome": "4.7.0",
"angular-file-upload": "2.5.0"
}
}
Package-lock.json
...
"htmlprocessor": {
"version": "0.2.6",
"resolved": "https://fakepath",
"integrity": "sha1",
"requires": {
"lodash": "~2.4.1"
},
"dependencies": {
"lodash": {
**"version": "2.4.2",**
"resolved": "https://fakepath",
"integrity": "sha1"
}
}
},
...
For example above - lodash needs to be updated to 4.17.20 of min to fix the vulnerability.
Do i add lodash to be a devDependency or update the package-lock.json manually ?
Note- package-lock.json is not pushed as part of source control but i am studying online that it should be
We're working off security vulnerabilities in our apps as well and have had a similar problem. There is no good answer:
Sure, you can edit your package-lock.json file by hand but that's just cheating around the issue. It won't somehow get rid of the vulnerability that lodash is bringing in because NPM will keep pulling down that version. You would be better off asking for a waiver for this security finding than trying to hide it.
Why is it pulling down that version? One of your devDependencies has a dependency on htmlprocessor. That processor lib specifically calls out the use of that version of lodash. You could submit a merge request to that library to get it updated to a newer version of lodash but it doesn't look like it's maintained anymore.
Adding a newer version of lodash as a devDependency will just mean you now depend on two versions of lodash. It won't fix anything.
This is both the blessing and curse of using NPM. Easy access to tons of libraries... but there are many no-longer-maintained libraries that get pulled in that are chock full of security issues.
I have installed bootbox with
bower install bootbox --save -dev
But when I use it I am getting
angular.js:13294 Error: $.fn.modal is not defined; please double check
you have included the Bootstrap JavaScript library. See
http://getbootstrap.com/javascript/ for more details.
I do have modal.js in my project, installed with bower too.
bower.json:
"dependencies": {
"angular": "1.5.2",
"angular-aria": "1.5.2",
"angular-bootstrap": "1.2.5",
"angular-cache-buster": "0.4.3",
"angular-cookies": "1.5.2",
"ngstorage": "0.3.10",
"angular-loading-bar": "0.9.0",
"angular-resource": "1.5.2",
"angular-sanitize": "1.5.2",
"angular-ui-router": "^0.3.1",
"bootstrap": "3.3.6",
"bootstrap-ui-datetime-picker": "2.2.3",
"jquery": "2.2.2",
"json3": "3.3.2",
"modernizr": "3.3.1",
"ng-file-upload": "12.0.4",
"ngInfiniteScroll": "1.2.2",
"swagger-ui": "2.1.4",
"ng-table": "^0.8.3",
"ng-contextmenu": "^0.4.1",
"ui-select": "angular-ui-select#^0.16.1",
"components-font-awesome": "^4.7.0",
"angular-bootstrap-contextmenu": "^0.9.7",
"Ionicons": "ionicons#^2.0.1",
"angular-ui-calendar": "^1.0.1",
"angular-bootstrap-switch": "^0.5.1",
"jqcloud2": "^2.0.2",
"angular-jqcloud": "^1.0.3",
"ngWig": "ng-wig#^3.0.7",
"AngularJS-Toaster": "angularjs-toaster#^2.1.0",
"sockjs-client": "1.0.3",
"stomp-websocket": "2.3.4",
"typeahead.js": "^0.11.1",
"bootbox.js": "bootbox#^4.4.0"
}
Any idea of where can this problem come from?
Circleci keeps failing with this error
ECONFLICT Unable to find suitable version for angular
These are my dependencies in bower.json
"dependencies": {
"angular": "1.4.7",
"angular-animate": "1.4.7",
"angular-credit-cards": "2.3.5",
"angular-local-storage": "0.2.2",
"angular-messages": "1.4.7",
"angular-sanitize": "1.4.7",
"angular-translate": "2.7.2",
"angular-ui-router": "0.2.15",
"bluebird": "2.9.34",
"bourbon": "4.2.6",
"immutable": "3.7.5",
"neat": "1.7.2",
"normalize-scss": "3.0.3",
"ramda": "0.16.0",
"rxjs": "2.5.2",
"system.js": "0.19.6",
"angular-markdown-directive": "0.3.1",
"angularjs-geolocation": "0.1.1",
"angulartics": "0.20.2",
"angulartics-google-analytics": "0.1.2",
"angulartics-facebook-pixel": "0.1.0"
},
"resolutions": {
"angular": "1.4.7"
}
I tried running it locally and it works fine, not sure what's the problem. Any help would be appreciated
add
"ignoredDependencies": ["angular"]
to your bower.cc file and it will ignore the dependancy (but you must be sure yourself that the package works with your version of angular).
I have the following dependencies in my bower.json file:
{
"name": "aposoft-frontend",
"dependencies": {
"angular-bootstrap": "0.13.0",
"jquery": "~2.1.4",
"bootstrap": "~3.3.5",
"angular-ui-router": "~0.2.15",
"angular-i18n": "~1.4.2",
"angular-local-storage": "~0.2.2",
"angular-http-auth": "~1.2.2",
"angular-bootstrap-show-errors": "~2.3.0",
"angular-xeditable": "~0.1.9",
"pace": "~1.0.2",
"angular-mocks": "~1.4.3",
"angular-ui-validate": "~1.1.1",
"angular-translate-loader-static-files": "~2.7.2",
"quick-ng-repeat": "~0.0.1",
"angular-holderjs": "~1.1.0",
"holderjs": "~2.8.2",
"angular-bootstrap-datetimepicker": "latest"
},
"devDependencies": {}
}
without "angular-bootstrap-datetimepicker": "latest" it works fine but with the dependency "angular-bootstrap-datetimepicker": "latest" I get following ERROR if I will build my frontend:
**[ERROR] bower ECONFLICT Unable to find suitable version for angular**
Does anyone know how I could solve this issue?
Thanks a lot!
Use * in place of latest to install the latest version