If I want to install a package via npm globally, then I get the following error repeatedly... Has anybody an idea to solve this problem?
The short answer is don't install grunt-contrib. It used to be a small collection of tasks but as the grunt-contrib-* series grew, so did that library.
Nobody ever needs to install every grunt-contrib-* library. Instead, just install the tasks you need: npm install grunt-contrib-compress --save-dev
Otherwise, if you insist, install the peer dependency version it expects npm install grunt-contrib-compress#0.6.1 and try installing again: npm install grunt-contrib.
Related
I have a problem from upload my VueJs#2/firebase project.
My last work version is at 11/2021.
But all version of components need to be update.
So npm install don't success to install and update all.
I need your help to say me what should I do to work again on this project.
I joined a complete log of run npm install and my package.json.
Please help me.
npm outdated will identify packages that should be updated.
What commands must I follow on the command line to downgrade. I ran uninstall and reinstalled as well as nom i -S firebase#... but now when I reload the app it just crashes.
If you have to install an older version of a package, just specify it
npm install <package>#<version>
For example: npm install firebase#9.2.0
You can also add the --save flag to that command to add it to your package.json dependencies, or --save --save-exact flags if you want that exact version specified in your package.json dependencies.
The install command is documented here: https://docs.npmjs.com/cli/install
If you're not sure what versions of a package are available, you can use:
npm view firebase versions
And npm view can be used for viewing other things about a package too.
https://docs.npmjs.com/cli/view
don't forget to remove .lock file first to rebuilt the depedency
can u give the error messege for us....
I know how to install latest package using npm:
npm i <package>#latest
but when the package is actually a sub-package it throws an error:
npm i #react-native-firebase/auth#latest
Error:
ENOENT: no such file or directory ...
strange enough I was not able to find something on google after hours of search.
i think when u use
npm install --save #react-native-firebase/app
its the latest version. try it and see the documentation.
rnfirebase
I had an issue: npm run watch was stuck after 10%, so I deleted node_modules directory and package-lock.json
But I guess I installed modules with npm install without using --save-dev, and after having reinstalled several of them I still get a warning and can't identify which package is missing here...
WARNING in ./resources/js/components/common/ContenuComponent.vue?vue&type=style&index=0&id=1a3ffd6c&scoped=true&lang=css& (./node_modules/css-loader/dist/cjs.js??ref--6-1!./node_modules/laravel-mix/node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--6-2!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/components/common/ContenuComponent.vue?vue&type=style&index=0&id=1a3ffd6c&scoped=true&lang=css&)
Module Warning (from ./node_modules/css-loader/dist/cjs.js):
Warning
(476:2) Unable to find uri in 'background:url() no-repeat top left black'
# ./resources/js/components/common/ContenuComponent.vue?vue&type=style&index=0&id=1a3ffd6c&scoped=true&lang=css& (./node_modules/style-loader!./node_modules/css-loader/dist/cjs.js??ref--6-1!./node_modules/laravel-mix/node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--6-2!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/components/common/ContenuComponent.vue?vue&type=style&index=0&id=1a3ffd6c&scoped=true&lang=css&) 2:14-388
# ./resources/js/components/common/ContenuComponent.vue?vue&type=style&index=0&id=1a3ffd6c&scoped=true&lang=css&
# ./resources/js/components/common/ContenuComponent.vue
# ./resources/js/app.js
# multi ./resources/js/app.js ./resources/sass/app.scss
I did:
npm install postcss-loader --save-dev
npm install style-loader --save-dev
npm install css-loader --save-dev
npm install file-loader --save-dev
npm install vue-loader --save-dev
Is there any way to identify what I am missing?
Thanks a lot!
when you remove package-lock.json, you remove references about which specific versions of each package were installed before. My guess is that there was an issue published within the css-loader module, which seems to be a dependency of a dependency of Laravel.
The easiest fix would be bringing back package-lock.json, removing node_modules again and reinstalling with npm install.
There are few things you can try based on the information you have provided. You can try npm cache clean or npm cache clean --f (this is a force, which will ask you if you know what you are doing, you can proceed with the force). Once the cache has been cleaned, you can try running npm install again. Also check your version of NodeJS and make sure that whatever packages you're using is also supporting the version. Node -V and check and make sure that css loader supports your version of node.
After I thought it had been fixed, I got the issue again today (worst actually, this time it was an error). So I went back to package-lock.json old version and after many tries and another hours lost, it worked.
I guess this is gonna happen again and obviously I cannot do that because I will add other packages in the future. I am wondering if there is any way to add all missing packages in package.json dev dependencies? I have no idea how to identify them?
It seems like npm install ls node_modules --save was working some years ago, so I m trying to dind something like this but reading in package-lock.json maybe (am I dreaming? :) )
Thanks a lot
I ran npm install grunt-contrib-uglify --save-dev to my local project folder and it kept adding a bunch of other node module packages. How do I make it only install the package specified?
NPM installes package dependencies recursively. So when you install grunt-contrib-uglify it will also install chalk, lodash, maxmin, uri-path and, uglify-js. It will also then install any dependencies those packages have. You can't install just grunt-contrib-uglify because it wouldn't work without them.