Laravel 9 Install vue router for vue 2.6.12 - laravel

I try installing vue router with run command "npm install vue-router" but then showing error like this:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: undefined#undefined
npm ERR! Found: vue#2.6.14
npm ERR! dev vue#"^2.6.12" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vue#"^3.2.0" from vue-router#4.0.14
npm ERR! node_modules/vue-router
npm ERR! vue-router#"*" from the root project
npm ERR!
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! See C:\Users\ACER\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ACER\AppData\Local\npm-cache_logs\2022-03-20T12_19_15_072Z-debug-0.log
please help

I solved it by installing vue-router#3.
npm install vue-router#3 --save
You can just try this.

Because your vue is not the latest version, it gives this error.
Use previous versions of vue-router.
To access old versions of vue-router, use the versions tab
Example : npm i vue-router#3.5.3

Related

why instaling type-graphql, #apollo/server and graphql together showing dependency error

I have been trying to install typegraphql with apollo/server in typescript node template but it showing dependency error, I don't know why all new version is not compatible with each other.
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: server#1.0.0
npm ERR! Found: graphql#16.6.0
npm ERR! node_modules/graphql
npm ERR! graphql#"*" from the root project
npm ERR! peer graphql#"^16.6.0" from #apollo/server#4.3.0
npm ERR! node_modules/#apollo/server
npm ERR! #apollo/server#"*" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! type-graphql#"*" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: graphql#15.8.0
npm ERR! node_modules/graphql
npm ERR! peer graphql#"^15.3.0" from type-graphql#1.1.1
npm ERR! node_modules/type-graphql
npm ERR! type-graphql#"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
$ npm i #apollo/server express graphql reflect-metadata type-graphql
should forcing it works or will it lead to data-leaks and all?
Thanks in advance for replying
The most recent version of type-graphql only works with graphql version ^15.5.0. Almost all newer versions of #apollo/server and graphql-related libraries, on the other hand, only support graphql version >= 16.
Fortunately, a newer version of type-graphql (version 2.0.0), which is still in beta, is available under the next tag version in npm.
To install it, first uninstall type-graphql and then reinstall it specifying the next tag:
npm uninstall type-graphql
npm install type-graphql#next
PS: If you want to look at a working example project, check out this.

Error installing npm dependency in Laravel 8 Sail: Conflicting peer dependency: postcss

I have a laravel 8 project that I need to make changes to. I installed laravel sail to start it but I get an error trying to install npm packages:
sail npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: laravel-mix#6.0.18
npm ERR! Found: postcss#7.0.35
npm ERR! node_modules/postcss
npm ERR! postcss#"^7.0.35" from the root project
npm ERR! postcss#"^7" from #tailwindcss/postcss7-compat#2.0.3
npm ERR! node_modules/#tailwindcss/postcss7-compat
npm ERR! #tailwindcss/postcss7-compat#"^2.0.3" from the root project
npm ERR! 38 more (#types/cssnano, autoprefixer, css-declaration-sorter, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer postcss#"^8.1.2" from laravel-mix#6.0.18
npm ERR! node_modules/laravel-mix
npm ERR! dev laravel-mix#"^6.0.18" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: postcss#8.4.20
npm ERR! node_modules/postcss
npm ERR! peer postcss#"^8.1.2" from laravel-mix#6.0.18
npm ERR! node_modules/laravel-mix
npm ERR! dev laravel-mix#"^6.0.18" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! /home/sail/.npm/_logs/2022-12-21T17_56_37_398Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in:
npm ERR! /home/sail/.npm/_logs/2022-12-21T17_56_37_398Z-debug-0.log
sail node -v
v18.12.1
sail npm -v
9.2.0

unable to resolve dependency tree in react-redux

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: quora2.0#0.1.0
npm ERR! Found: react#18.2.0
npm ERR! node_modules/react
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^16.8.0 || ^17.0.0" from #material-ui/core#4.12.4
npm ERR! node_modules/#material-ui/core
npm ERR! #material-ui/core#"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\Dell\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Dell\AppData\Local\npm-cache_logs\2022-11-06T06_29_10_297Z-debug-0.log
PS D:\Projects\QuoraClone\quora2.0> npm i #material-ui/core
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: quora2.0#0.1.0
npm ERR! Found: react#18.2.0
npm ERR! node_modules/react
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^16.8.0 || ^17.0.0" from #material-ui/core#4.12.4
npm ERR! node_modules/#material-ui/core
npm ERR! #material-ui/core#"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\Dell\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Dell\AppData\Local\npm-cache_logs\2022-11-06T06_31_22_131Z-debug-0.log
PS D:\Projects\QuoraClone\quora2.0> npm config set legacy-peer-deps true
PS D:\Projects\QuoraClone\quora2.0> npm install
npm WARN deprecated stable#0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm WARN deprecated w3c-hr-time#1.0.2: Use your platform's native performance.now() and performance.timeOrigin.
npm WARN deprecated svgo#1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
expecting to get answers

Unable to install botbuilder-ai-orchestrator on my existing bot

I have created a bot with azure bot framework composer and it seems to be working fine. Now I want to add other bots as skills in it and I am required to install botbuilder-ai-orchestrator bit it is failing with the following error
Command failed: npm install --loglevel=error --save botbuilder-ai-orchestrator npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead. npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: BotName#undefined npm ERR! Found: botbuilder-dialogs-declarative#4.15.0-preview npm ERR! node_modules/botbuilder-dialogs-declarative npm ERR! peer botbuilder-dialogs-declarative#"~4.15.0-preview" from #microsoft/bot-components-teams#1.2.1 npm ERR! node_modules/#microsoft/bot-components-teams npm ERR! #microsoft/bot-components-teams#"^1.2.1" from the root project npm ERR! botbuilder-dialogs-declarative#"4.15.0-preview" from botbuilder-ai#4.15.0 npm ERR! node_modules/botbuilder-ai npm ERR! botbuilder-ai#"4.15.0" from botbuilder-ai-luis#4.15.0-preview npm ERR! node_modules/botbuilder-ai-luis npm ERR! botbuilder-ai-luis#"4.15.0-preview" from botbuilder-dialogs-adaptive-runtime#4.15.0-preview npm ERR! node_modules/botbuilder-dialogs-adaptive-runtime npm ERR! botbuilder-dialogs-adaptive-runtime#"4.15.0-preview" from botbuilder-dialogs-adaptive-runtime-integration-express#4.15.0-preview npm ERR! node_modules/botbuilder-dialogs-adaptive-runtime-integration-express npm ERR! 1 more (the root project) npm ERR! botbuilder-ai#"4.15.0" from botbuilder-ai-qna#4.15.0-preview npm ERR! node_modules/botbuilder-ai-qna npm ERR! botbuilder-ai-qna#"4.15.0-preview" from botbuilder-dialogs-adaptive-runtime#4.15.0-preview npm ERR! node_modules/botbuilder-dialogs-adaptive-runtime npm ERR! botbuilder-dialogs-adaptive-runtime#"4.15.0-preview" from botbuilder-dialogs-adaptive-runtime-integration-express#4.15.0-preview npm ERR! node_modules/botbuilder-dialogs-adaptive-runtime-integration-express npm ERR! 1 more (the root project) npm ERR! 2 more (botbuilder-dialogs-adaptive, botbuilder-dialogs-adaptive-runtime) npm ERR! npm ERR! Could not resolve dependency: npm ERR! botbuilder-ai-orchestrator#"*" from the root project npm ERR! npm ERR! Conflicting peer dependency: botbuilder-dialogs-declarative#4.16.0-preview npm ERR! node_modules/botbuilder-dialogs-declarative npm ERR! peer botbuilder-dialogs-declarative#"4.16.0-preview" from botbuilder-ai-orchestrator#4.16.0 npm ERR! node_modules/botbuilder-ai-orchestrator npm ERR! botbuilder-ai-orchestrator#"*" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! See C:\Users\username\AppData\Local\npm-cache\eresolve-report.txt for a full report. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\username\AppData\Local\npm-cache\_logs\2022-07-14T10_23_29_714Z-debug-0.log
Node version installed on my machine is 16.16.0
Below is the list of dependencies already insatlled
"#microsoft/bot-components-teams": "^1.2.1",
"botbuilder-ai-luis": "4.15.0-preview",
"botbuilder-ai-qna": "4.15.0-preview",
"botbuilder-dialogs-adaptive-runtime-integration-express": "4.15.0-preview",
"cross-env": "latest"

Laravel8 npm run dev outputs: ERESOLVE unable to resolve dependency tree

Goal
Avoid error message.
I have been getting the following error message when I run the command npm run dev:
npm notice
npm notice New major version of npm available! 7.6.1 -> 8.1.4
npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.1.4
npm notice Run npm install -g npm#8.1.4 to update!
npm notice
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: acorn#7.4.1
npm ERR! node_modules/acorn
npm ERR! acorn#"^7.0.0" from acorn-node#1.8.2
npm ERR! node_modules/acorn-node
npm ERR! acorn-node#"^1.6.1" from detective#5.2.0
npm ERR! node_modules/detective
npm ERR! detective#"^5.2.0" from tailwindcss#2.2.19
npm ERR! node_modules/tailwindcss
npm ERR! dev tailwindcss#"^2.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional acorn#"^8.5.0" from terser#5.10.0
npm ERR! node_modules/terser
npm ERR! terser#"^5.9.0" from laravel-mix#6.0.39
npm ERR! node_modules/laravel-mix
npm ERR! dev laravel-mix#"^6.0.6" from the root project
npm ERR! terser#"^5.7.2" from terser-webpack-plugin#5.2.5
npm ERR! node_modules/terser-webpack-plugin
npm ERR! terser-webpack-plugin#"^5.2.4" from laravel-mix#6.0.39
npm ERR! node_modules/laravel-mix
npm ERR! dev laravel-mix#"^6.0.6" from the root project
npm ERR! 1 more (webpack)
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /home/ml/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/ml/.npm/_logs/2021-12-02T07_41_55_149Z-debug.log
Quick Solution:
I can avoid the problem / error message with the following command:
npm install --legacy-peer-deps.
Output:
npm WARN deprecated querystring#0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
added 807 packages, and audited 808 packages in 12s
84 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
Question
What do I have to do to run npm install again without getting the error message?
I have the same issue too. I have fixed it using this line
npm i acorn --dev
then run again
npm install && install run dev
npm install npm#latest -g
then
npm install webpack-dev-server --save-dev
working for me
If you are using Laravel Homestead Package for any Vagrant Environment, then don't run the command inside the Vagrant Project Directory.
Go outside to the local directory of the project and run these commands.
image of commands inside vagrant
You should run these here::
image of commands outside vagrant

Resources