Browserslist: caniuse-lite is outdated. Please run: npx browserslist#latest --update-db NextJS - next.js

When I run my NextJs program this error always pops up
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist#latest --update-db
So then I run npx browserslist#latest --update-db in the shell:
npx: installed 6 in 1.905s
Current version: 1.0.30001179
New version: 1.0.30001179
Removing old caniuse-lite from lock file
Installing new caniuse-lite version
$ npm install caniuse-lite
Cleaning package.json dependencies from caniuse-lite
$ npm uninstall caniuse-lite
caniuse-lite has been successfully updated
No target browser changes
And the I when I run my Next program again, the same error occurs. This started happening to me yesterday. I just used npx create-next-app and the npm run dev.

UPDATE
The new version (10.0.6) has been released few moments ago. No warnings present.
This is a falsy warning in current Next.js version (10.0.5).
It's already solved in canary version, which is a base for the next stable version. You can install it (npm install next#canary or yarn add next#canary) and make sure there are no warnings.
Since canary version is not recommended for using in production, you can continue working in 10.0.5 without any side effects. The warning will disappear after new stable version release.

Related

Downgrade Firebase 9.6 to 9.2.0

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....

How to fix the error: "No Next.js version could be detected in your project." when deploying to Vercel with Turborepo and pnpm

I am trying to deploy the Turborepo example app to Vercel using instructions from here, and getting the error:
Error: No Next.js version could be detected in your project. Make sure `"next"` is installed in "dependencies" or "devDependencies"
How can I fix it?
Docs says that the build command npm install --prefix=../.. is only required if using npm workspaces, and doesn't apply when using pnpm or yarn workspaces. Since am using pnpm, I replace npm install --prefix=../.. with pnpm i -r and it worked.

updating firebase using expo client

I am working on a react native app, I use firebase, I recently updated expo, and when I use this command expo start, everything works but I get this message on the logs:
Some of your project's dependencies are not compatible with currently installed expo package version:
- firebase - expected version range: 7.9.0 - actual version installed: ^8.2.0 Your project may not work correctly until you install the correct versions of the packages. To install the correct versions of these packages, please run: expo install [package-name ...] Starting Metro Bundler
when use expo install firebase i get the following error:
Installing 1 SDK 37.0.0 compatible native module using Yarn.
> yarn add firebase#7.9.0
'yarnpkg' is not recognized as an internal or external command,
operable program or batch file.
spawn yarnpkg ENOENT
Error: spawn yarnpkg ENOENT
how can I correctly update firebase?
first do
npm install yarn -g
after that is complete
then do
yarn add firebase#7.9.0

Unable to install grunt on windows 8

Been trying to install Grunt on my laptop to try it out, I already had Node, so installed the Grunt cli which went ok and then ran the command npm init to create the package.json file, followed the necessary steps and also went well, however when I get to the point of installing dependencies, I get an error.
For instance am trying to install Grunt as a dependency, with the following command:
npm install grunt --save-dev
After running this command I get the following error:
No README.md file found
If anyone knows what I am meant to do please let me know.

npm semver version invalid issue with grunt installation

While installing grunt, one of the errors is unmet dependency semver#4
i am using node#0.10.33, npm#1.4.28
i run two commands and it shows two versions and one is invalid
npm list -g
and in the tree it shows semver#2.3.0 invalid
now i run
npm view semver version
now it shows 4.1.0
i tried npm update semver
but nothing happens
i have even tried to the solution provided in similar question npm error invalid semver
curl https://npmjs.org/install.sh | sh
but donesnt help
I am new to npm and grunt please help!
what do you mean by While installing grunt?
Installing the grunt-cli tools or the grunt-runner in your project?
since 4.0 grunt is split into 2 modules:
grunt-cli
grunt
grunt-cli needs to be installed globally, and only 1 time:
$ npm install grunt-cli -g
grunt needs to be installed locally in every project where you want to use grunt and grunt-plugins:
$ npm install grunt
updating npm:
the crazy stuff about npm is, that you can even update npm via npm:
$ npm update npm -g
the current npm version is 2.1.9, so maybe this solves your problem.
hint: use nvm vor node.js version management. this solves multiple problems:
easy version switching
you don't need sudo for global packages

Resources