I've tried to install this wordpress template, which relies on some node modules for a gulp file, on a Windows PC.
The output of npm install is the following:
$ npm install
npm WARN package.json gulp-wordpress-template#0.0.1 No repository field.
npm http GET https://registry.npmjs.org/gulp-load-plugins
npm http GET https://registry.npmjs.org/gulp-autoprefixer
npm http GET https://registry.npmjs.org/gulp
npm http GET https://registry.npmjs.org/browser-sync
npm http 304 https://registry.npmjs.org/gulp-autoprefixer
npm ERR! Error: No compatible version found: gulp-autoprefixer#'^1.0.1'
npm ERR! Valid install targets:
npm ERR! ["0.0.1","0.0.2","0.0.3","0.0.4","0.0.5","0.0.6","0.0.7","0.0.8","0.0.9
","0.0.10","1.0.0","1.0.1","2.0.0","2.1.0"]
npm ERR! at installTargetsError (c:\Program Files\nodejs\node_modules\npm\li
b\cache.js:719:10)
npm ERR! at c:\Program Files\nodejs\node_modules\npm\lib\cache.js:638:10
npm ERR! at saved (c:\Program Files\nodejs\node_modules\npm\node_modules\npm
-registry-client\lib\get.js:142:7)
npm ERR! at c:\Program Files\nodejs\node_modules\npm\node_modules\graceful-f
s\polyfills.js:133:7
npm ERR! at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "c:\\Program Files\\nodejs\\node.exe" "c:\\Program Files\\nodej
s\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! cwd c:\Users\USER\Desktop\wordpress-test
npm ERR! node -v v0.10.15
npm ERR! npm -v 1.3.5
npm http 304 https://registry.npmjs.org/gulp-load-plugins
npm http 304 https://registry.npmjs.org/gulp
npm http GET https://registry.npmjs.org/gulp-connect-php
npm http GET https://registry.npmjs.org/gulp-shell
npm http GET https://registry.npmjs.org/gulp-sass
npm http 304 https://registry.npmjs.org/browser-sync
npm http 304 https://registry.npmjs.org/gulp-sass
npm http 304 https://registry.npmjs.org/gulp-connect-php
npm http 304 https://registry.npmjs.org/gulp-shell
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! c:\Users\USER\Desktop\wordpress-test\npm-debug.log
npm ERR! not ok code 0
According to the error, gulp-autoprefixer isn't available in version ^1.0.1. What is strange, is that below it suggests that 1.0.1 is a valid version.
What's even more strange, is that I can flawlessly install the package on an OSX machine.
I thought node is cross platform – is there something I am missing?
You need a newer version of npm that supports the ^ character in the version fields. The easiest way is to this is to just upgrade node (the latest stable being v0.10.35 as of this writing).
Related
While installing the module webdriverio using npm, I am getting the following error:
sudo npm install webdriverio
[sudo] password for username:
npm WARN package.json indexof#0.0.1 No repository field.
npm http GET https://registry.npmjs.org/webdriverio
npm http 304 https://registry.npmjs.org/webdriverio
npm WARN engine webdriverio#5.4.9: wanted: {"node":">= 4.8.5"} (current: {"node":"v0.10.15","npm":"1.3.5"})
npm http GET https://registry.npmjs.org/grapheme-splitter
npm http GET https://registry.npmjs.org/css-value
npm http GET https://registry.npmjs.org/lodash.merge
npm http GET https://registry.npmjs.org/lodash.zip
npm http GET https://registry.npmjs.org/rgb2hex
npm http GET https://registry.npmjs.org/serialize-error
npm http GET https://registry.npmjs.org/webdriver
npm http GET https://registry.npmjs.org/wdio/logger
npm http GET https://registry.npmjs.org/wdio/config
npm http GET https://registry.npmjs.org/wdio/repl
npm http 304 https://registry.npmjs.org/css-value
npm ERR! Error: No compatible version found: css-value#'^0.0.1'
npm ERR! Valid install targets:
npm ERR! ["0.0.1"]
npm ERR! at installTargetsError (/usr/local/lib/node_modules/npm/lib/cache.js:719:10)
npm ERR! at /usr/local/lib/node_modules/npm/lib/cache.js:638:10
npm ERR! at saved (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/get.js:142:7)
npm ERR! at /usr/local/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:133:7
npm ERR! at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR! System Linux 4.15.0-43-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "webdriverio"
npm ERR! cwd /home/username/research
npm ERR! node -v v0.10.15
npm ERR! npm -v 1.3.5
npm http 304 https://registry.npmjs.org/lodash.merge
npm http 304 https://registry.npmjs.org/serialize-error
npm http 304 https://registry.npmjs.org/lodash.zip
npm http 304 https://registry.npmjs.org/grapheme-splitter
npm http 304 https://registry.npmjs.org/webdriver
npm http 304 https://registry.npmjs.org/rgb2hex
npm http 405 https://registry.npmjs.org/wdio/repl
npm ERR! TypeError: Object.keys called on non-object
npm ERR! at Function.keys (native)
npm ERR! at installTargetsError (/usr/local/lib/node_modules/npm/lib/cache.js:708:24)
npm ERR! at /usr/local/lib/node_modules/npm/lib/cache.js:638:10
npm ERR! at saved (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/get.js:142:7)
npm ERR! at /usr/local/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:133:7
npm ERR! at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR! System Linux 4.15.0-43-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "webdriverio"
npm ERR! cwd /home/username/research
npm ERR! node -v v0.10.15
npm ERR! npm -v 1.3.5
npm ERR! type called_on_non_object
npm http 405 https://registry.npmjs.org/wdio/logger
npm ERR! TypeError: Object.keys called on non-object
npm ERR! at Function.keys (native)
npm ERR! at installTargetsError (/usr/local/lib/node_modules/npm/lib/cache.js:708:24)
npm ERR! at /usr/local/lib/node_modules/npm/lib/cache.js:638:10
npm ERR! at saved (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/get.js:142:7)
npm ERR! at /usr/local/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:133:7
npm ERR! at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR! System Linux 4.15.0-43-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "webdriverio"
npm ERR! cwd /home/username/research
npm ERR! node -v v0.10.15
npm ERR! npm -v 1.3.5
npm ERR! type called_on_non_object
npm http 405 https://registry.npmjs.org/wdio/config
npm ERR! TypeError: Object.keys called on non-object
npm ERR! at Function.keys (native)
npm ERR! at installTargetsError (/usr/local/lib/node_modules/npm/lib/cache.js:708:24)
npm ERR! at /usr/local/lib/node_modules/npm/lib/cache.js:638:10
npm ERR! at saved (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/get.js:142:7)
npm ERR! at /usr/local/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:133:7
npm ERR! at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR! System Linux 4.15.0-43-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "webdriverio"
npm ERR! cwd /home/username/research
npm ERR! node -v v0.10.15
npm ERR! npm -v 1.3.5
npm ERR! type called_on_non_object
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/username/research/npm-debug.log
npm ERR! not ok code 0
Could someone please help with this? I do not understand why this is happening since when I do npm info loadash.merge, the module version is clearly present. I have also tried to see what my $NODE_PATH contains (as some answers on stackoverflow suggest), and it seems to be pointing towards the correct path of node, or at least the path where nvm installed node:
/home/username/.nvm/versions/node/v10.15.1/bin/node
Additionally, I am not sure about this particular warning:
npm WARN engine webdriverio#5.4.9: wanted: {"node":">= 4.8.5"} (current: {"node":"v0.10.15","npm":"1.3.5"}) My node version is 10.15.1 and not 0.10.15
I think you're missing the css-value library based on this part of the stack trace:
npm ERR! Error: No compatible version found: css-value#'^0.0.1'
Try to resolve this by doing: npm i css-value
Additionally, your stack trace is complaining about using an outdated version of Node. I would consider updating node since your version is very old:
npm WARN engine webdriverio#5.4.9: wanted: {"node":">= 4.8.5"} (current: {"node":"v0.10.15","npm":"1.3.5"})
Your issue is probably with using sudo in the npm install. You can check this out by using sudo node -v and it will probably give you a different node version than your nvm installed one, this would indicate that node in your server is broken in some places due some previous installation. To circumvent it I suggest the following that has worked for me for similar issues.
sudo su
nvm alias default 10.15.1
npm cache clean --force
npm install webdriverio
If it still gives syntax errors due to dependencies, use
npm install webdriverio --unsafe-perm
I am trying to install ari-client,using this command:
sudo npm install ari-client
Here is the error I get:
npm http GET http://registry.npmjs.org/ari-client
npm http 304 http://registry.npmjs.org/ari-client
npm http GET http://registry.npmjs.org/swagger-client/2.0.26
npm http GET http://registry.npmjs.org/ws/0.4.31
npm http GET http://registry.npmjs.org/underscore/1.6.0
npm http GET https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.1.tgz
npm http 400 https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.1.tgz
npm ERR! fetch failed https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.1.tgz
npm ERR! Error: 400 Bad Request
npm ERR! at WriteStream.<anonymous> (/usr/share/npm/lib/utils/fetch.js:57:12)
npm ERR! at WriteStream.EventEmitter.emit (events.js:117:20)
npm ERR! at fs.js:1601:14
npm ERR! at /usr/lib/nodejs/graceful-fs/graceful-fs.js:103:5
npm ERR! at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR! reportbug --attach /home/bzegeju/npm-debug.log npm
npm ERR! System Linux 3.11.0-26-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "ari-client"
npm ERR! cwd /home/bzegeju
npm ERR! node -v v0.10.15
npm ERR! npm -v 1.2.18
npm http 304 http://registry.npmjs.org/ws/0.4.31
npm http 304 http://registry.npmjs.org/underscore/1.6.0
npm http 304 http://registry.npmjs.org/swagger-client/2.0.26
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/bzegeju/npm-debug.log
npm ERR! not ok code 0
Any help on the error or how I can manually install the library?
For Manual installation:
1.Go to npm site search for "ari-client".
2.Click the given "github" link , from there you can download as ZIP file.
3.Extract it and use in your project
I tried to install some packages for my BrowserQuest Server.
I used: npm install -d
Node Version v0.10.21
NPM Version v 1.3.11
OS Debian 7.0 Wheezy
Errors:
npm ERR! at installTargetsError (/usr/local/lib/node_modules/npm/lib/cache.js:719:10)
npm ERR! at next (/usr/local/lib/node_modules/npm/lib/cache.js:698:17)
npm ERR! at /usr/local/lib/node_modules/npm/lib/cache.js:675:5
npm ERR! at saved (/usr/local/lib/node_modules/npm/node_modules/npm-registry-
client/lib/get.js:142:7)
npm ERR! at /usr/local/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:133:7
npm ERR! at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR! System Linux 3.2.41-042stab081.5
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-d"
npm ERR! cwd /root/BrowserQuest
npm ERR! node -v v0.10.21
npm ERR! npm -v 1.3.11
npm http 304 https://registry.npmjs.org/redis
npm http 304 registry.npmjs org/connect
npm http 304 registry.npmjs org/underscore
npm http 304 registry.npmjs org/bison
npm http 304 registry.npmjs org/websocket-server
npm http 304 registry.npmjs org/sanitizer
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /root/BrowserQuest/npm-debug.log
npm ERR! not ok code 0>
Please help me!
I had a similar problem on ubuntu 12.10, and it was SSL related. Until i had figured it out, disabling https could solve things for a moment:
npm set registry http://registry.npmjs.org/
I tried installing derbyjs and I got the following error:
alex#alex-K43U:~/derby$ npm install -g derby
npm http GET https://registry.npmjs.org/derby
npm http 200 https://registry.npmjs.org/derby
npm http GET https://registry.npmjs.org/derby/-/derby-0.3.13.tgz
npm http 200 https://registry.npmjs.org/derby/-/derby-0.3.13.tgz
npm http GET https://registry.npmjs.org/dom-shim
npm http GET https://registry.npmjs.org/html-util
npm http GET https://registry.npmjs.org/tracks
npm http GET https://registry.npmjs.org/racer/0.3.13
npm http GET https://registry.npmjs.org/chokidar
npm http GET https://registry.npmjs.org/less
npm http GET https://registry.npmjs.org/up
npm http GET https://registry.npmjs.org/stylus
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/commander
npm http GET https://registry.npmjs.org/nib
npm http 200 https://registry.npmjs.org/dom-shim
npm http GET https://registry.npmjs.org/dom-shim/-/dom-shim-0.1.1.tgz
npm http 200 https://registry.npmjs.org/tracks
npm http GET https://registry.npmjs.org/tracks/-/tracks-0.1.8.tgz
npm http 200 https://registry.npmjs.org/html-util
npm http GET https://registry.npmjs.org/html-util/-/html-util-0.1.3.tgz
npm http 200 https://registry.npmjs.org/racer/0.3.13
npm http 200 https://registry.npmjs.org/chokidar
npm ERR! error installing derby#0.3.13
npm http GET https://registry.npmjs.org/racer/-/racer-0.3.13.tgz
npm ERR! Error: No compatible version found: chokidar#'>=0.2.6'
npm ERR! No valid targets found.
npm ERR! Perhaps not compatible with your version of node?
npm ERR! at installTargetsError (/home/alex/nvm/v0.6.7/lib/node_modules/npm/lib/cache.js:488:10)
npm ERR! at next_ (/home/alex/nvm/v0.6.7/lib/node_modules/npm/lib/cache.js:438:17)
npm ERR! at next (/home/alex/nvm/v0.6.7/lib/node_modules/npm/lib/cache.js:415:44)
npm ERR! at /home/alex/nvm/v0.6.7/lib/node_modules/npm/lib/cache.js:408:5
npm ERR! at saved (/home/alex/nvm/v0.6.7/lib/node_modules/npm/lib/utils/npm-registry-client/get.js:147:7)
npm ERR! at Object.oncomplete (/home/alex/nvm/v0.6.7/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:231:7)
npm ERR! You may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR!
npm ERR! System Linux 3.0.0-24-generic
npm ERR! command "node" "/home/alex/nvm/v0.6.7/bin/npm" "install" "-g" "derby"
npm ERR! cwd /home/alex/derby
npm ERR! node -v v0.6.7
npm ERR! npm -v 1.1.0-3
npm ERR! message No compatible version found: chokidar#'>=0.2.6'
npm ERR! message No valid targets found.
npm ERR! message Perhaps not compatible with your version of node?
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/alex/derby/npm-debug.log
npm not ok
I have no idea how to fix this. Any suggestions?
Looking at chokidar's package.json file for versions >=0.2.6 tells me that it requires node.js version 0.6.10 or newer. You are trying to install it for node 0.6.7.
Furthermore I'd suggest using Derby with node 0.8.x. At least I have had no installation issues with Derby on node 0.8.x.
When I run npm install node-inspector, I get the following:
....
GET https://registry.npmjs.org/policyfile/0.0.4
npm http GET https://registry.npmjs.org/mime
npm http GET https://registry.npmjs.org/qs
npm http GET https://registry.npmjs.org/formidable
npm http 304 https://registry.npmjs.org/socket.io-client/0.9.8
npm http 304 https://registry.npmjs.org/redis/0.7.2
npm http 304 https://registry.npmjs.org/policyfile/0.0.4
npm http 304 https://registry.npmjs.org/formidable
npm http 304 https://registry.npmjs.org/mime
npm http 304 https://registry.npmjs.org/qs
npm http GET https://registry.npmjs.org/hiredis
npm http GET https://registry.npmjs.org/uglify-js/1.2.5
npm http GET https://registry.npmjs.org/active-x-obfuscator/0.0.1
npm http GET https://registry.npmjs.org/xmlhttprequest/1.2.2
npm http GET https://registry.npmjs.org/ws
npm http 304 https://registry.npmjs.org/hiredis
> hiredis#0.1.14 preinstall C:\apache\expTest\node_modules\node-inspector\node_modules\socket.io\node_modules\redis\node_modules\hiredis
> make || gmake
npm http 304 https://registry.npmjs.org/uglify-js/1.2.5
npm http 304 https://registry.npmjs.org/ws
npm http 304 https://registry.npmjs.org/active-x-obfuscator/0.0.1
npm http 304 https://registry.npmjs.org/xmlhttprequest/1.2.2
'make' is not recognized as an internal or external command,
operable program or batch file.
'gmake' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! error installing hiredis#0.1.14
npm ERR! error installing redis#0.7.2
npm ERR! error installing socket.io#0.9.8
npm ERR! error rolling back socket.io#0.9.8 Error: UNKNOWN, unknown error 'C:\apache\expTest\node_modules\node-inspector\node_modules\socket.io\node_modules\socket.io-client'
npm ERR! error installing node-inspector#0.2.0beta3
npm ERR! Error: ENOENT, no such file or directory 'C:\apache\expTest\node_modules\node-inspector\node_modules\socket.io\node_modules\socket.io-client\node_modules\___ws.npm\p
npm ERR! You may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR!
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "c:\\Program Files (x86)\\nodejs\\\\node.exe" "c:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "node-inspector"
npm ERR! cwd C:\apache\expTest
npm ERR! node -v v0.6.11
npm ERR! npm -v 1.1.1
npm ERR! path C:\apache\expTest\node_modules\node-inspector\node_modules\socket.io\node_modules\socket.io-client\node_modules\___ws.npm\package\lib\Validation.fallback.js
npm ERR! fstream_path C:\apache\expTest\node_modules\node-inspector\node_modules\socket.io\node_modules\socket.io-client\node_modules\___ws.npm\package\lib\Validation.fallbac
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! message ENOENT, no such file or directory 'C:\apache\expTest\node_modules\node-inspector\node_modules\socket.io\node_modules\socket.io-client\node_modules\___ws.npm\
npm ERR! errno {}
npm ERR! fstream_stack Object.oncomplete (c:\Program Files (x86)\nodejs\node_modules\npm\node_modules\fstream\lib\writer.js:204:26)
npm ERR! error rolling back node-inspector#0.2.0beta3 Error: UNKNOWN, unknown error 'C:\apache\expTest\node_modules\node-inspector\node_modules\socket.io\node_modules\socket.
npm ERR! hiredis#0.1.14 preinstall: `make || gmake`
npm ERR! `cmd "/c" "make || gmake"` failed with 1
npm ERR!
npm ERR! Failed at the hiredis#0.1.14 preinstall script.
npm ERR! This is most likely a problem with the hiredis package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! make || gmake
npm ERR! You can get their info via:
npm ERR! npm owner ls hiredis
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "c:\\Program Files (x86)\\nodejs\\\\node.exe" "c:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "node-inspector"
npm ERR! cwd C:\apache\expTest
npm ERR! node -v v0.6.11
npm ERR! npm -v 1.1.1
npm ERR! code ELIFECYCLE
npm ERR! message hiredis#0.1.14 preinstall: `make || gmake`
npm ERR! message `cmd "/c" "make || gmake"` failed with 1
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\apache\expTest\npm-debug.log
npm not ok
It looks like it is trying to run a nix command at hiredis, which fails, crashing the entire install. Is there any way to get around this? I have heard plenty of Windows users using node-inspector, but perhaps this is a dependency from a newer version. Any ideas?
As M. Laing said, you're missing GNU make, which is required by hiredis (a redis connector).
You don't need redis for node-inspector, but it's required by socket.io, even though it's for a completely optional feature. I've opened an issue on github about that:
https://github.com/LearnBoost/socket.io/issues/978
While this gets resolved, here's a work around:
Download socket.io's ZIP archive from github and unzip it.
Edit the package.json file and remove redis from the dependencies.
Run a cmd, enter the folder and type npm install.
Type npm install node-inspector again.
Since socket.io is now installed, it should now succeed.