#vue-cli peer dependency warn - vue.js

I created project using vue-cli 3, cd into it, ran npm install and got this error:
npm WARN ajv-keywords#2.1.1 requires a peer of ajv#^5.0.0 but none is installed. You must install peer dependencies yourself.
I ran
npm install ajv
Which finished with success, but I'm still getting same warn on npm install

npm install -g npm-install-peers
try this it will add all the missing peers and remove all the error

Related

How do I install jest?

Been trying to install jest with this command:
npm i --global jest
and get these messages:
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 request-promise-native#1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
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
/Users/GRW/.nvm/versions/node/v6.11.1/bin/jest -> /Users/GRW/.nvm/versions/node/v6.11.1/lib/node_modules/jest/bin/jest.js
npm WARN jsdom#16.4.0 requires a peer of canvas#^2.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN ws#7.3.1 requires a peer of bufferutil#^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN ws#7.3.1 requires a peer of utf-8-validate#^5.0.2 but none is installed. You must install peer dependencies yourself.
+ jest#26.4.2
updated 1 package in 32.731s
Have tried manually installing peer dependencies with:
npm i --save --global canvas#^2.5.0
npm i --save --global bufferutil#^4.0.1
npm i --save --global utf-8-validate#^5.0.2
but still am unable to install jest.
How do I install jest?
EDIT: Forget about theĀ global install and the peer dependency warnings go away, but I still get:
-bash: jest: command not found
Since I seemed to have a prior installation of nvm that kept installations of different versions of node in different directories, I decided to start fresh.
Uninstalled and deleted jest, node, npm, and nvm.
Reinstalled node/npm, and was able to install jest and get the jest -v command to work properly.

Cannot find module 'webpack-cli/bin/config-yargs', cannot find module 'webpack-cli'

I have tried nearly all solutions however nothing has worked for me. i cloned a repo from a friend and tried to run the client directory. When i try run client, i get the error:
Cannot find module 'webpack-cli/bin/config-yargs'
Cannot find module 'webpack-cli'
Once i cloned the project i did npm install (as it said in the readME) but when i tried to run the client i would run into this problem:
solutions i tried:
npm install -g vue-cli
npm install --save-dev webpack
npm install --save-dev webpack-cli
i tried 'webpack --version' it will tell me i am missing something and if i want to install it. i click yes and i get the following error:
Installing 'webpack-cli' (running 'npm install -D webpack-cli')...
npm WARN ajv-keywords#3.4.1 requires a peer of ajv#^6.9.1 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-middleware#3.4.0 requires a peer of webpack#^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-server#3.1.11 requires a peer of webpack#^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-cli#3.3.11 requires a peer of webpack#4.x.x but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.11 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
webpack-cli#3.3.11
updated 1 package and audited 12959 packages in 13.437s
24 packages are looking for funding
run npm fund for details
found 33 vulnerabilities (22 low, 7 moderate, 4 high)
run npm audit fix to fix them, or npm audit for details
Error: Cannot find module 'webpack-cli'
UPDATE:
My colleague updated some of the dependencies by GitHub bot and i pulled the repo. That seemed to do the trick

npm ERR! 404 Not Found: 1.9.1#latest

I cloned a project to my local repo:
$ npm i
npm WARN cropper#3.1.4 requires a peer of jquery#>= 1.9.1 but none is installed. You must install peer dependencies yourself.
npm WARN The package iview is included as both a dev and production dependency.
npm WARN The package vuex is included as both a dev and production dependency.
But when I install the jquery#>= 1.9.1 dependency manually , I get can not found error:
$ npm install jquery#>= 1.9.1 --save-dev
npm ERR! code E404
npm ERR! 404 Not Found: 1.9.1#latest
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/luowensheng/.npm/_logs/2018-02-12T07_13_29_793Z-debug.log
What this line
npm WARN cropper#3.1.4 requires a peer of jquery#>= 1.9.1 but none is installed. You must install peer dependencies yourself.
means is you need to have a jquery version greater than 1.9.1
Just do
npm install jquery#^1.9.1 or npm install jquery#latest if you want the latest jquery version which is 3.x.x

Getting error for Karma Tests

I am getting the below error on my karma unit test:
npm WARN karma-coffee-preprocessor#0.1.3 requires a peer of karma#>=0.9 but none was installed.
npm WARN karma-junit-reporter#1.2.0 requires a peer of karma#>=0.9 but none was installed.
npm WARN karma#1.0.0 No description
npm WARN karma#1.0.0 No repository field.
Uninstalled karma and installed it again
$ npm uninstall -g karma
$ npm install karma --save-dev
This worked for me.
I got an error while trying to install it again, saying refusing to install dependency of itself. Change "name" in package.json from "karma" to "karma-test" and it worked. :)

mocha & chai dependencies when running npm install

I want to run an Ionic app with Grunt (Yeoman Ionic)
To do this the script runs npm install and bower install. Then run grunt to compile and then grunt serve to serve it on local host.
npm install does not create peer dependencies with Mocha and Chai which is making bower install abort like so:
Running "karma:continuous" (karma) task
Warning: Cannot find module 'mocha' Use --force to continue.
Aborted due to warnings.
I ran npm install -g chai mocha then npm install and got the same
npm WARN karma-mocha#0.1.10 requires a peer of mocha#* but none was installed.
npm WARN karma-chai#0.1.0 requires a peer of chai#* but none was installed.
Even though this is a warning it is yielding errors when running yo ionic:
npm WARN karma-chai#0.1.0 requires a peer of chai#* but none was installed.
npm WARN karma-mocha#0.1.10 requires a peer of mocha#* but none was installed.
ERROR: Error: ENOENT: no such file or directory, rename '/Users/donjohnson/ionicNom/app/app/css' -> '/Users/donjohnson/ionicNom/app/app/styles'
ERROR: Error: ENOENT: no such file or directory, rename '/Users/donjohnson/ionicNom/app/app/js' -> '/Users/donjohnson/ionicNom/app/app/scripts'
ERROR: Error: ENOENT: no such file or directory, rename '/Users/donjohnson/ionicNom/app/app/img' -> '/Users/donjohnson/ionicNom/app/app/images'
This makes grunt serve open a browser page with nothing in it :(
npm install --save-dev mocha chai to your project (without the -g).
As of version 3, npm does not automatically install peerDependencies
It seems that with NPM 3, the dependencies won't be installed by default, use this to update:
npm install chai#*
npm install mocha#*
and then use:
npm install
bower install