Using npm to install Ionic Cloud but get error about Jasmine - npm

I am running this command to add Ionic Cloud to my project:
npm install --save #ionic/cloud-angular
But I get this error:
npm WARN angularfire2#2.0.0-beta.6 requires a peer of #types/jasmine#^2.5.36 but none was installed.
What do i need to do to get Jasmine installed? I assume this is what I need to do.
I have tried:
npm install --save jasmine
But this gives me:
npm install --save jasmine
ionic-hello-world# /Users/chris/Documents/ionic/wurk
├── UNMET PEER DEPENDENCY #types/jasmine#^2.5.36
└── jasmine#2.5.2
npm WARN angularfire2#2.0.0-beta.6 requires a peer of #types/jasmine#^2.5.36 but none was installed.

install #types/jasmine
npm install #types/jasmine --save
see: https://www.npmjs.com/package/#types/jasmine

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.

#vue-cli peer dependency warn

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

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