Why does npm update -g show warnings about unmet dependencies? - node.js

I just ran sudo npm update -g and the output contained warning messages about unmet dependencies. Here's an excerpt:
npm WARN deprecated grunt-bower-install#1.6.0: use grunt-wiredep instead
strip-ansi#0.1.1 /opt/local/lib/node_modules/bower/node_modules/chalk/node_modules/strip-ansi
intersect#0.0.3 /opt/local/lib/node_modules/bower/node_modules/bower-json/node_modules/intersect
object-assign#0.1.2 /opt/local/lib/node_modules/yo/node_modules/insight/node_modules/object-assign
array-filter#0.0.1 /opt/local/lib/node_modules/bower/node_modules/shell-quote/node_modules/array-filter
graceful-fs#2.0.3 /opt/local/lib/node_modules/npm/node_modules/cmd-shim/node_modules/graceful-fs
ansicolors#0.2.1 /opt/local/lib/node_modules/bower/node_modules/cardinal/node_modules/ansicolors
strip-ansi#0.1.1 /opt/local/lib/node_modules/generator-angular/node_modules/chalk/node_modules/strip-ansi
npm WARN unmet dependency /opt/local/lib/node_modules/bower/node_modules/insight/node_modules/inquirer requires async#'~0.2.8' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
object-assign#0.1.2 /opt/local/lib/node_modules/bower/node_modules/insight/node_modules/object-assign
npm WARN unmet dependency /opt/local/lib/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob requires minimatch#'0.3' but will load
npm WARN unmet dependency /opt/local/lib/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch,
npm WARN unmet dependency which is version 0.2.14
unique-stream#0.0.5 /opt/local/lib/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/unique-stream
rimraf#2.2.8 /opt/local/lib/node_modules/npm/node_modules/fstream/node_modules/rimraf
npm WARN unmet dependency /opt/local/lib/node_modules/cabin/node_modules/inquirer requires lodash#'~1.2.1' but will load
npm WARN unmet dependency /opt/local/lib/node_modules/cabin/node_modules/lodash,
npm WARN unmet dependency which is version 2.2.1
What is causing this? Is it fixable?

Related

UNMET PEER DEPENDENCY ISSUE

I have been trying to install the ngx bootstrap from [https://ng-bootstrap.github.io/#/getting-started]
by entering the command: npm install ngx-bootstrap --save
but the result is this:
+-- UNMET PEER DEPENDENCY #angular/common#2.4.10
+-- UNMET PEER DEPENDENCY #angular/compiler#2.4.10
+-- UNMET PEER DEPENDENCY #angular/core#2.4.10
+-- UNMET PEER DEPENDENCY #angular/forms#2.4.10
+-- UNMET PEER DEPENDENCY jquery#1.9.1 - 3
+-- ngx-bootstrap#2.0.0-beta.9
+-- UNMET PEER DEPENDENCY popper.js#^1.12.3
`-- UNMET PEER DEPENDENCY typescript#2.0.10
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN #ng-bootstrap/ng-bootstrap#1.0.0-beta.5 requires a peer of #angular/core#^4.0.3 but none was installed.
npm WARN #ng-bootstrap/ng-bootstrap#1.0.0-beta.5 requires a peer of #angular/common#^4.0.3 but none was installed.
npm WARN #ng-bootstrap/ng-bootstrap#1.0.0-beta.5 requires a peer of #angular/forms#^4.0.3 but none was installed.
npm WARN bootstrap#4.0.0-beta.2 requires a peer of jquery#1.9.1 - 3 but none was installed.
npm WARN bootstrap#4.0.0-beta.2 requires a peer of popper.js#^1.12.3 but none was installed.
npm WARN ngx-bootstrap#2.0.0-beta.9 requires a peer of #angular/common#>=4.3.0 || >5.0.0 but none was installed.
npm WARN ngx-bootstrap#2.0.0-beta.9 requires a peer of #angular/compiler#>=4.3.0 || >5.0.0 but none was installed.
npm WARN ngx-bootstrap#2.0.0-beta.9 requires a peer of #angular/core#>=4.3.0 || >5.0.0 but none was installed.
npm WARN ngx-bootstrap#2.0.0-beta.9 requires a peer of #angular/forms#>=4.3.0 || >5.0.0 but none was installed.
npm WARN ngx-bootstrap#2.0.0-beta.9 requires a peer of typescript#>=2.3.0 but none was installed.
I do not understand what's happening.
I am fairly new to Angular 2 and the relevant technologies. Would appreciate your help ! Thank you.
hello you need to install your perDependencies, if you install a package that depends on specific versions of other packages, If it didn't find the correct version of package then "Peer dependency" is unmet, try this:
npm install -g npm-install-peers
npm-install-peers
this will install peerDependencies

Cant install ionic framework - Dependency error

I am trying to install ionic framework on my Ubuntu 14.04 Linux system. I already installed the nodejs,npm,cordova. I use the command 'npm install -g ionic' in my terminal and everytime I get the following error
npm http GET https://registry.npmjs.org/ionic
npm http 304 https://registry.npmjs.org/ionic
npm WARN unmet dependency /home/dineshadhithya/node_modules/ionic/node_modules/connect/node_modules/finalhandler requires debug#'1.0.4' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /home/dineshadhithya/node_modules/ionic/node_modules/request/node_modules/ form-data requires combined-stream#'~0.0.4' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
ionic#1.7.14 node_modules/ionic
This seemed to have solved the problem for many: Why does npm install say I have unmet dependencies?
remove node_modules using rm -rf node_modules/
run npm cache clean

SyntaxError: Unexpected token ILLEGAL on comment with Web Component Tester

I use Codeship to test my project based on the Polymer starter kit v1.1.
When I run npm test inside the test pipeline I see the following error:
> # test /home/rof/src/github.com/TFarla/night-live
> gulp test:local
/home/rof/src/github.com/TFarla/night-live/node_modules/browser-sync/node_modules/lodash/index.js:8404
/**
^^^
SyntaxError: Unexpected token ILLEGAL
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:413:25)
at Object.Module._extensions..js (module.js:452:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/home/rof/src/github.com/TFarla/night-live/node_modules/browser-sync/lib/hooks.js:3:20)
at Module._compile (module.js:434:26)
at Object.Module._extensions..js (module.js:452:10)
npm ERR! Test failed. See above for more details.
Here are the setup commands:
# By default we use the Node.js version set in your package.json or the latest
# version from the 0.10 release
#
# You can use nvm to install any Node.js (or io.js) version you require.
nvm install 4.0
nvm use 4.0
npm install -g bower
npm install -g gulp
npm install && bower install
Anyone got a solution?
Edit:
Not sure if related but when Codeship executes npm install it outputs a lot of unmet dependencies.
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/browser-sync/node_modules/browser-sync-ui requires connect-history-api-fallback#'0.0.5' but will load
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/connect-history-api-fallback,
npm WARN unmet dependency which is version 1.1.0
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/browser-sync/node_modules/socket.io/node_modules/engine.io requires debug#'1.0.3' but will load
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/browser-sync/node_modules/socket.io/node_modules/debug,
npm WARN unmet dependency which is version 2.1.0
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/browser-sync/node_modules/socket.io/node_modules/socket.io-parser requires debug#'0.7.4' but will load
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/browser-sync/node_modules/socket.io/node_modules/debug,
npm WARN unmet dependency which is version 2.1.0
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/browser-sync/node_modules/socket.io/node_modules/socket.io-client requires debug#'0.7.4' but will load
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/browser-sync/node_modules/socket.io/node_modules/debug,
npm WARN unmet dependency which is version 2.1.0
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/gulp-jshint/node_modules/jshint requires lodash#'3.7.x' but will load
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/gulp-jshint/node_modules/lodash,
npm WARN unmet dependency which is version 3.10.1
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/web-component-tester/node_modules/bower requires chalk#'^1.0.0' but will load
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/web-component-tester/node_modules/chalk,
npm WARN unmet dependency which is version 0.5.1
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/web-component-tester/node_modules/bower requires update-notifier#'^0.3.0' but will load
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/web-component-tester/node_modules/update-notifier,
npm WARN unmet dependency which is version 0.5.0
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/web-component-tester/node_modules/wd requires async#'~1.0.0' but will load
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/web-component-tester/node_modules/async,
npm WARN unmet dependency which is version 0.9.2
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/web-component-tester/node_modules/wd requires lodash#'~3.9.3' but will load
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/web-component-tester/node_modules/lodash,
npm WARN unmet dependency which is version 3.10.1
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/web-component-tester/node_modules/socket.io/node_modules/socket.io-parser requires debug#'0.7.4' but will load
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/web-component-tester/node_modules/socket.io/node_modules/debug,
npm WARN unmet dependency which is version 2.1.0
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/web-component-tester/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client requires debug#'1.0.4' but will load
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/web-component-tester/node_modules/socket.io/node_modules/socket.io-client/node_modules/debug,
npm WARN unmet dependency which is version 0.7.4
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/web-component-tester/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client requires parseuri#'0.0.4' but will load
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/web-component-tester/node_modules/socket.io/node_modules/socket.io-client/node_modules/parseuri,
npm WARN unmet dependency which is version 0.0.2
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/web-component-tester/node_modules/wct-sauce/node_modules/request/node_modules/har-validator requires chalk#'^1.0.0' but will load
npm WARN unmet dependency /home/rof/src/github.com/TFarla/night-live/node_modules/web-component-tester/node_modules/chalk,
npm WARN unmet dependency which is version 0.5.1
After installing the dependencies, did you go inside the node modules directory and changed any of the lodash files ?
Here are some things you can try.
In your project dorectory, do rm -r node-modules. This will delete the node dependency directory.
Go to your package.json and check if the dependencies are deprecated; Check to see if they have newer version available on npm. If they do, update the package.json accordingly. (latest version for browser-sync is 2.18.13)
List item
Do npm install
Do bower install

npm ERR! cb<> never called! - browserSync

I'm new to grunt and am hitting a wall with BrowserSync. Whether I try to install it globally or for a particular folder
npm install -g grunt-browser-sync
Or
npm install grunt-browser-sync --save-dev
I get the same error: npm ERR! cb<> never called! I've tried npm cache clear and deleting the node_modules folder and runing npm install again but nothing seems to help.
Watch, Compass, and Uglify are all working. I just can't get browserSync to install successfully.
Here is a copy/paste of commands I just entered and the results.
D:\xampp\htdocs\testing>npm install grunt-browser-sync --save-dev
npm WARN package.json testing#1.0.0 No repository field.
npm WARN package.json testing#1.0.0 No README data
npm WARN unmet dependency D:\xampp\htdocs\testing\node_modules\socket.io\node_mo
dules\engine.io requires debug#'1.0.3' but will load
npm WARN unmet dependency D:\xampp\htdocs\testing\node_modules\socket.io\node_mo
dules\debug,
npm WARN unmet dependency which is version 0.7.4
grunt-browser-sync#1.5.3 node_modules\grunt-browser-sync
└── browser-sync#1.9.0 (emitter-steward#0.0.1, easy-extender#2.2.0, opt-merger#1
.1.0, commander#2.6.0, opn#1.0.1, object-path#0.8.1, minimist#1.1.0, eazy-logger
#2.1.0, ua-parser-js#0.7.3, browser-sync-client#1.0.1, lodash#2.4.1, dev-ip#0.1.
7, portscanner-plus#0.2.0, connect#3.3.4, serve-index#1.6.0, tfunk#3.0.0, serve-
static#1.8.0, glob-watcher#0.0.7, localtunnel#1.5.0, resp-modifier#1.0.1, foxy#7
.1.0)
D:\xampp\htdocs\testing>grunt browserSync
Running "browserSync:bsFiles" (browserSync) task
Warning: Cannot find module 'base64id' Use --force to continue.
Aborted due to warnings.
D:\xampp\htdocs\testing>
Please advise.
following sskips suggestion below I got the following error:
D:\xampp\htdocs\testing>npm install base64id
npm WARN package.json testing#1.0.0 No repository field.
npm WARN package.json testing#1.0.0 No README data
npm WARN unmet dependency D:\xampp\htdocs\testing\node_modules\socket.io\node_mo
dules\engine.io requires debug#'1.0.3' but will load
npm WARN unmet dependency D:\xampp\htdocs\testing\node_modules\socket.io\node_mo
dules\debug,
npm WARN unmet dependency which is version 0.7.4
base64id#0.1.0 node_modules\base64id
D:\xampp\htdocs\testing>
you lose something.
install base64id as below, then try again
npm install base64id

npm reports "requires (one version)' but will load (another version)"

Likely after cordove install with npm I got warning messages almost for every npm operations "requires colors#'>=0.6.0' but will load .. color"
D:\Workspaces\Enide-Studio-2014\OpenWith.js>npm i . -g
C:\Users\weibl\AppData\Roaming\npm\openwith -> C:\Users\weibl\AppData\Roaming\npm\node_modules\openwith\bin\openwith.js
npm WARN unmet dependency C:\Users\weibl\AppData\Roaming\npm\node_modules\phonegap\node_modules\cordova requires colors#'>=0.6.0' but will load
npm WARN unmet dependency C:\Users\weibl\AppData\Roaming\npm\node_modules\phonegap\node_modules\colors,
npm WARN unmet dependency which is version 0.6.0-1
npm WARN unmet dependency C:\Users\weibl\AppData\Roaming\npm\node_modules\phonegap\node_modules\node-static requires colors#'>=0.6.0' but will load
npm WARN unmet dependency C:\Users\weibl\AppData\Roaming\npm\node_modules\phonegap\node_modules\colors,
npm WARN unmet dependency which is version 0.6.0-1
openwith#0.11.0 C:\Users\weibl\AppData\Roaming\npm\node_modules\openwith
How to fix such npm errors?
As Andrew hinted, solution was to
npm -g update colors
Clean out the node-Modules folder and re-run:
npm install
At first, delete the phonegap\ folder in the location C:\Users\weibl\AppData\Roaming\npm\node_modules\. Of course, specific location will be different for others.
Then, proceed for any npm install/update command you want.

Resources