i tried install vue cli.but I am getting a lot of strange errors. I searched for errors but could not find them:
linux#admin:~/Masaüstü/learn-vue$ sudo npm install vue -g
[sudo] password for linux:
npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EAI_AGAIN: request to https://registry.npmjs.org/vue failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org registry.npmjs.org:443
npm WARN registry Using stale data from https://registry.npmjs.org/ due to a request error during revalidation.
+ vue#2.6.12
updated 1 package in 10.676s
linux#admin:~/Masaüstü/learn-vue$ vue --version
'vue' komutu sistemde bulunamadı. Ama şununla kurulabilir:
sudo snap install vue
linux#admin:~/Masaüstü/learn-vue$ npm i -g #vue/cli
npm ERR! Response timeout while trying to fetch https://registry.npmjs.org/#vue%2fcli-ui-addon-webpack (over 30000ms)
npm ERR! A complete log of this run can be found in:
npm ERR! /home/linux/.npm/_logs/2020-09-24T17_37_08_787Z-debug.log
linux#admin:~/Masaüstü/learn-vue$ npm i -g vue-cli#2.9.6
npm ERR! code EAI_AGAIN
npm ERR! errno EAI_AGAIN
npm ERR! request to https://registry.npmjs.org/vue-cli failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org registry.npmjs.org:443
npm ERR! A complete log of this run can be found in:
npm ERR! /home/linux/.npm/_logs/2020-09-24T17_40_02_518Z-debug.log
linux#admin:~/Masaüstü/learn-vue$ npm cache clean
npm ERR! As of npm#5, the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be valid. If you want to make sure everything is consistent, use 'npm cache verify' instead. On the other hand, if you're debugging an issue with the installer, you can use `npm install --cache /tmp/empty-cache` to use a temporary cache instead of nuking the actual one.
npm ERR!
npm ERR! If you're sure you want to delete the entire cache, rerun this command with --force.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/linux/.npm/_logs/2020-09-24T17_40_33_560Z-debug.log
linux#admin:~/Masaüstü/learn-vue$ sudo npm cache clean
npm ERR! As of npm#5, the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be valid. If you want to make sure everything is consistent, use 'npm cache verify' instead. On the other hand, if you're debugging an issue with the installer, you can use `npm install --cache /tmp/empty-cache` to use a temporary cache instead of nuking the actual one.
npm ERR!
npm ERR! If you're sure you want to delete the entire cache, rerun this command with --force.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-09-24T17_40_40_872Z-debug.log
linux#admin:~/Masaüstü/learn-vue$ sudo npm cache clean --force
npm WARN using --force I sure hope you know what you are doing.
linux#admin:~/Masaüstü/learn-vue$
I searched everything on the internet, I asked questions in many forums but unfortunately I could not find an answer. Finally, I opened the topic here hoping to find an answer.
guys please help me.Thanks
Vue namespaced their cli (from v3). Use npm i -g #vue/cli
EDIT: Check the docs for more info
here:
linux#admin:~/Masaüstü/learn-vue$ sudo npm i -g #vue/cli
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated #hapi/joi#15.1.1: joi is leaving the #hapi organization and moving back to 'joi' (https://github.com/sideway/joi/issues/2411)
npm WARN deprecated #hapi/topo#3.1.6: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/bourne#1.3.2: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/address#2.1.4: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/hoek#8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.2.7 (node_modules/#vue/cli/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN #vue/compiler-sfc#3.0.0 requires a peer of vue#3.0.0 but none is installed. You must install peer dependencies yourself.
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! { [Error: EACCES: permission denied, access '/usr/local/lib/node_modules']
npm ERR! stack:
npm ERR! 'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/linux/.npm/_logs/2020-09-24T18_13_12_868Z-debug.log
linux#admin:~/Masaüstü/learn-vue$ vue --version
'vue' komutu sistemde bulunamadı. Ama şununla kurulabilir:
sudo snap install vue
linux#admin:~/Masaüstü/learn-vue$
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\Users\moham/package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\moham\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\moham\AppData\Local\npm-cache_logs\2021-12-30T09_56_30_171Z-debug.log
Related
I want to include Mock Service Worker into my React project with Typescript support, but as soon as I run npm install msw --save-dev command, my terminal shows me these error messages:
PS F:\Programming\React Practices\ReactPizza\my-app> npm install msw --save-dev
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: msw#0.41.0
npm ERR! Found: typescript#4.7.2
npm ERR! node_modules/typescript
npm ERR! peer typescript#">= 2.7" from fork-ts-checker-webpack-plugin#6.5.2
npm ERR! node_modules/fork-ts-checker-webpack-plugin
npm ERR! fork-ts-checker-webpack-plugin#"^6.5.0" from react-dev-utils#12.0.1
npm ERR! node_modules/react-dev-utils
npm ERR! react-dev-utils#"^12.0.1" from react-scripts#5.0.1
npm ERR! node_modules/react-scripts
npm ERR! react-scripts#"5.0.1" from the root project
npm ERR! peerOptional typescript#"^3.2.1 || ^4" from react-scripts#5.0.1
npm ERR! node_modules/react-scripts
npm ERR! react-scripts#"5.0.1" from the root project
npm ERR! 2 more (tsutils, the root project)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional typescript#">= 4.2.x <= 4.6.x" from msw#0.41.0
npm ERR! node_modules/msw
npm ERR! dev msw#"*" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: typescript#4.6.4
npm ERR! node_modules/typescript
npm ERR! peerOptional typescript#">= 4.2.x <= 4.6.x" from msw#0.41.0
npm ERR! node_modules/msw
npm ERR! dev msw#"*" 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\Win10\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\Win10\AppData\Local\npm-cache\_logs\2022-05-27T17_17_28_323Z-debug.log
I don't know what the matter is, and how to fix it.
My mini-project is powered by create-react-app. I mean the project was started out with this:
npx create-react-app my-app --template typescript
When I don't utilize Typescript with npx create-react-app everything is going well.
You may easily check those error messages on GitHub:https://github.com/AlexKor-5/ReactPizzaApp_Ts/tree/5849bb4cb928550dcb4bfd66ecb8b7bf0757fb9f by an attempt to install MSW.
I can only assume you're using npm 7 (since npm 6 would automatically force install it). And it's telling you what the issue is, a conflicting peer dependency, typescript.
It's also telling you how to fix it:
Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
Aka:
npm install --legacy-peer-deps
Otherwise reinstall a later/earlier version of either package so the peer dependencies can match up. Msw is using ">= 4.2.x <= 4.6.x" typescript and you have typescript#4.7.2 installed, it's breaking because msw doesn't accept your typescript version.
So I have a project available on stackblitz that I want to use offline for my own purposes. for reference, here is the link to what I want to use- https://stackblitz.com/edit/nvs-angular-search-dropdown-istnzp. So, I tried to download the code and planned to run it using npm install and ng serve. but I am getting lots of errors on running npm install saying like this:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: angular#0.0.0
npm ERR! Found: #angular/compiler#12.0.3
npm ERR! node_modules/#angular/compiler
npm ERR! #angular/compiler#"^12.0.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #angular/compiler#"7.0.4" from #angular/compiler-cli#7.0.4
npm ERR! node_modules/#angular/compiler-cli
npm ERR! dev #angular/compiler-cli#"~7.0.0" 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\cnaag\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\cnaag\AppData\Local\npm-cache\_logs\2021-06-06T10_39_43_617Z-debug.log
Any help in this regard would be amazing!
Instead of NPM, install Yarn on your machine and run yarn install
First error
user#suser-Air / % npm install -g protractor
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib/node_modules
Solution - I gave permission to the above path and ran again npm install -g protractor
Second error
user#suser-Air / % npm install -g protractor
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm ERR! code EACCES
npm ERR! syscall symlink
npm ERR! path ../lib/node_modules/protractor/bin/protractor
npm ERR! dest /usr/local/bin/protractor
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, symlink '../lib/node_modules/protractor/bin/protractor' -> '/usr/local/bin/protractor'
npm ERR! [OperationalError: EACCES: permission denied, symlink '../lib/node_modules/protractor/bin/protractor' -> '/usr/local/bin/protractor'] {
npm ERR! cause: [Error: EACCES: permission denied, symlink '../lib/node_modules/protractor/bin/protractor' -> '/usr/local/bin/protractor'] {
Node Version: 14.16.1
NPM version : '6.14.12'
Operating System and Version macOS Big Sur
you need to run the command in sudo mode
sudo npm install -g protractor
When I install react-circular-progressbar into my react projects it show an error why?
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: nadeems-portfolio#0.1.0
npm ERR! Found: react#17.0.1
npm ERR! node_modules/react
npm ERR! react#"^17.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^0.14.0 || ^15.0.0 || ^16.0.0" from react-circular-progressbar#2.0.3
npm ERR! node_modules/react-circular-progressbar
npm ERR! react-circular-progressbar#"*" 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 /home/nadeem/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/nadeem/.npm/_logs/2020-12-05T09_58_59_238Z-deb
This is because one of the depencies can not be resolved combined with your current dependencies.
The following part indicates that ciruclar-progressbar (version 2.0.3) requires react 15 or 16 as a peer dependency, and you are using a newer version in your dependency list.
Could not resolve dependency: peer react#"^0.14.0 || ^15.0.0 || ^16.0.0" from react-circular-progressbar#2.0.3
There are a few solutions;
Downgrade the package that doesn't fit in the constraints of the package that you want to install
Look for a version of the package that you are trying to install that has updated their peer dependencies to include react 17
use npm install <package-name> --force to ignore it (really not recommended, unless you have manually verified there are no incompatibilities)
use npm install <package-name> --legacy-peer-deps.
The first two options are deduced from the error you have given. Whereas the last two options are provided in the error itself.
cannot install jest..
I am attempting to install jest with npm and i am getting the following error:
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^2.1.2 (node_modules/jest-haste-map/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN jsdom#15.2.1 requires a peer of canvas#^2.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN ws#7.2.1 requires a peer of bufferutil#^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN ws#7.2.1 requires a peer of utf-8-validate#^5.0.2 but none is installed. You must install peer dependencies yourself.
npm ERR! Maximum call stack size exceeded
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-02-17T07_45_50_660Z-debug.log
obviously is see there is a problem with jsdom requiring canvas
I see this post about this issue jsdom requiring canvas
that basically says to upgrade npm... it did this, but it didn't work...
Edit:
I tried to isntall canvas but i get and error:
npm ERR! code ENOENT
npm ERR! syscall rename
npm ERR! path /c/repos/sandbox/css-vue-webpack/css-vue-webpack/node_modules/#babel/traverse/node_modules/ms
npm ERR! dest /c/repos/sandbox/css-vue-webpack/css-vue-webpack/node_modules/needle/node_modules/ms
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, rename '/c/repos/sandbox/css-vue-webpack/css-vue-webpack/node_modules/#babel/traverse/node_modules/ms' -> '/c/repos/sandbox/css-vue-webpack/css-vue-webpack/node_modules/needle/node_modules/ms'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent