I am trying to install phonegap on my mac using sudo npm install -g phonegap.
And i keep getting this errors:
npm ERR! TypeError: Object #<Object> has no method 'match'
npm ERR! at Object.scriptpath_ (/Users/admin/npm/node_modules/read-package-json/read-json.js:138:23)
npm ERR! at Array.forEach (native)
npm ERR! at scriptpath (/Users/admin/npm/node_modules/read-package-json/read-json.js:132:19)
npm ERR! at /Users/admin/npm/node_modules/read-package-json/read-json.js:119:33
npm ERR! at Array.forEach (native)
npm ERR! at extras (/Users/admin/npm/node_modules/read-package-json/read-json.js:118:21)
npm ERR! at parseJson (/Users/admin/npm/node_modules/read-package-json/read-json.js:87:17)
npm ERR! at /Users/admin/npm/node_modules/read-package-json/read-json.js:59:33
npm ERR! at fs.js:266:14
npm ERR! at /Users/admin/npm/node_modules/graceful-fs/graceful-fs.js:103:5
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! System Darwin 12.5.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "phonegap"
npm ERR! cwd /Users/admin
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.3.23
npm ERR! type undefined_method
And:
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/admin/npm-debug.log
npm ERR! not ok code 0
What is the problem?
you need to update your npm that's the command on macOSX npm -g install npm#latest
Related
I want to install pm2 on my rasspberry pi 3:
npm install -g pm2
but i get this error:
(node:5118) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use
os.tmpdir() instead.
npm ERR! Error: Method Not Allowed
npm ERR! at errorResponse (/usr/share/npm/lib/cache/add-named.js:260:10)
npm ERR! at /usr/share/npm/lib/cache/add-named.js:203:12
npm ERR! at saved (/usr/share/npm/node_modules/npm-registry-client/lib/get.js:167:7)
npm ERR! at FSReqWrap.oncomplete (fs.js:135:15)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Linux 4.9.59-v7+
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "pm2"
npm ERR! cwd /home/pi/JSMTProxy
npm ERR! node -v v8.11.1
npm ERR! npm -v 1.4.21
npm ERR! code E405
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/pi/JSMTProxy/npm-debug.log
npm ERR! not ok code 0
I try to add sudo before the command but nothing change.
You need to update npm.
Use the following command and try again:
npm install -g npm#latest
I am facing a problem with Installing jitsi-meet , I have followed the instruction that you can find in this page [ my system is ubuntu 14.04]
https://github.com/jitsi/jitsi-meet
and when I executed the npm install I had this stack trace :
npm http 404 https://registry.npmjs.org/jitsi-meet-logger
npm ERR! TypeError: Object.keys called on non-object
npm ERR! at Function.keys (native)
npm ERR! at installTargetsError (/usr/share/npm/lib/cache.js:708:24)
npm ERR! at /usr/share/npm/lib/cache.js:638:10
npm ERR! at saved (/usr/share/npm/node_modules/npm-registry-client/lib/get.js:142:7)
npm ERR! at /usr/lib/nodejs/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.4.0-31-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /videochat/jitsi-meet
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! type called_on_non_object
npm http 404 https://registry.npmjs.org/jQuery-Impromptu
npm ERR! TypeError: Object.keys called on non-object
npm ERR! at Function.keys (native)
npm ERR! at installTargetsError (/usr/share/npm/lib/cache.js:708:24)
npm ERR! at /usr/share/npm/lib/cache.js:638:10
npm ERR! at saved (/usr/share/npm/node_modules/npm-registry-client/lib/get.js:142:7)
npm ERR! at /usr/lib/nodejs/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.4.0-31-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /videochat/jitsi-meet
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! type called_on_non_object
and it got stuck , is there anyother way to install jitsi-meet and make it working ??
Regards,
The Node and npm versions you're using are way too old. In order to build Jitsi Meet you need at least Node 6 and npm 3: https://github.com/jitsi/jitsi-meet#building-the-sources
Latest Jitsi works on node lts version. If you using an ubuntu environment then you have to install n and after that, you can easily change your node enviroment.
Visit :- https://github.com/tj/n
I have not been able to successfully install ember-cli. I finally was able to run:
sudo npm install -g ember-cli
But when running:
user#host:~ ember new ember-app
I get:
/usr/bin/env: node: No such file or directory
I installed node.js from the repositories using sudo apt-get install nodejs and same with npm.
I have installed bower and tried to re-install npm. Here is the last error:
user#host:~ npm install -g ember-cli
npm http GET https://registry.npmjs.org/ember-cli
npm http 200 https://registry.npmjs.org/ember-cli
npm http GET https://registry.npmjs.org/ember-cli/-/ember-cli-0.2.7.tgz
npm http 200 https://registry.npmjs.org/ember-cli/-/ember-cli-0.2.7.tgz
npm ERR! Error: shasum check failed for /home/user/tmp/npm-14461-xfhNCJKF/1435776262780-0.6301117099355906/tmp.tgz
npm ERR! Expected: fefcd9fe7faf276a5a68c8bfcc92288c0f0678d5
npm ERR! Actual: c120ca4196f11da6e51f9c8ebb273439dcfee615
npm ERR! at /usr/lib/nodejs/sha/index.js:38:8
npm ERR! at ReadStream.<anonymous> (/usr/lib/nodejs/sha/index.js:85:7)
npm ERR! at ReadStream.EventEmitter.emit (events.js:117:20)
npm ERR! at _stream_readable.js:920:16
npm ERR! at process._tickCallback (node.js:415:13)
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.13.0-55-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "ember-cli"
npm ERR! cwd /home/user
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/user/npm-debug.log
npm ERR! not ok code 0
For clarity, I am able to install other items using npm. Just not ember-cli.
UPDATE:
I am getting similar errors that I've received in previous executions of npm install -g ember-cli when run the following:
npm install -g latest-version
Received the following error:
npm http GET https://registry.npmjs.org/latest-version
npm http 304 https://registry.npmjs.org/latest-version
npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules/latest-version'
npm ERR! { [Error: EACCES, mkdir '/usr/local/lib/node_modules/latest-version']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/usr/local/lib/node_modules/latest-version',
npm ERR! fstream_type: 'Directory',
npm ERR! fstream_path: '/usr/local/lib/node_modules/latest-version',
npm ERR! fstream_class: 'DirWriter',
npm ERR! fstream_stack:
npm ERR! [ '/usr/lib/nodejs/fstream/lib/dir-writer.js:36:23',
npm ERR! '/usr/lib/nodejs/mkdirp/index.js:37:53',
npm ERR! 'Object.oncomplete (fs.js:107:15)' ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Linux 3.13.0-55-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "--global" "latest-version"
npm ERR! cwd /home/user
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! path /usr/local/lib/node_modules/latest-version
npm ERR! fstream_path /usr/local/lib/node_modules/latest-version
npm ERR! fstream_type Directory
npm ERR! fstream_class DirWriter
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, mkdir '/usr/local/lib/node_modules/latest-version'
npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/dir-writer.js:36:23
npm ERR! fstream_stack /usr/lib/nodejs/mkdirp/index.js:37:53
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/user/npm-debug.log
npm ERR! not ok code 0
-
UPDATE:
"Fix" is in the comment below.
For your node issue, try the following command which will make it so your system recognizes your node.js directory as node:
sudo ln -s /usr/bin/nodejs /usr/bin/node
Regarding the issue with administrator access, simply run your commands with sudo at the beginning. Sudo is usually required in situations where modifications to the filesystem are necessary.
hello i try to run npm install -g yo but i have got error :
npm install -g yo
npm http GET https://registry.npmjs.org/yo
npm http 304 https://registry.npmjs.org/yo
npm ERR! Error: No compatible version found: yo
npm ERR! No valid targets found.
npm ERR! Perhaps not compatible with your version of node?
npm ERR! at installTargetsError (/usr/local/lib/node_modules/npm/lib/cache.js:486:10)
npm ERR! at next_ (/usr/local/lib/node_modules/npm/lib/cache.js:436:17)
npm ERR! at next (/usr/local/lib/node_modules/npm/lib/cache.js:413:44)
npm ERR! at /usr/local/lib/node_modules/npm/lib/cache.js:406:5
npm ERR! at saved (/usr/local/lib/node_modules/npm/lib/utils/npm-registry-client/get.js:151:7)
npm ERR! at Object.oncomplete (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:230: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.13.0-36-generic
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "yo"
npm ERR! cwd /home
npm ERR! node -v v0.6.18
npm ERR! npm -v 1.1.21
npm ERR! message No compatible version found: yo
npm ERR! message No valid targets found.
npm ERR! message Perhaps not compatible with your version of node?
npm ERR! Error: EACCES, open 'npm-debug.log'
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR!
npm ERR! System Linux 3.13.0-36-generic
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "yo"
npm ERR! cwd /home
npm ERR! node -v v0.6.18
npm ERR! npm -v 1.1.21
npm ERR! path npm-debug.log
npm ERR! code EACCES
npm ERR! message EACCES, open 'npm-debug.log'
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/npm-debug.log
I havent got any idea what is wrong my npm version is 1.1.21 my node version is v0.6.18
Can you give me some advice what is wrong with that configuration ?
You need to upgrade your version of Node.js and npm.
From the Yeoman website:
Install prerequisites
Before installing Yeoman, you will need the following:
Node.js v0.10.x+
npm (which comes bundled with Node) v1.4.3+
git
Thanks before starting, Am a kinda of a newbie using yeoman for seeding my new project. I tried to install using, this command
npm install -g yo
i get this error
npm ERR! Error: No compatible version found: yo
npm ERR! No valid targets found.
npm ERR! Perhaps not compatible with your version of node?
npm ERR! at installTargetsError (/usr/share/npm/lib/cache.js:488:10)
npm ERR! at next_ (/usr/share/npm/lib/cache.js:438:17)
npm ERR! at next (/usr/share/npm/lib/cache.js:415:44)
npm ERR! at /usr/share/npm/lib/cache.js:408:5
npm ERR! at saved (/usr/share/npm/lib/utils/npm-registry-client/get.js:147:7)
npm ERR! at Object.oncomplete (/usr/lib/nodejs/graceful-fs.js:230:7)
npm ERR! You may report this log at:
npm ERR! <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR! reportbug --attach /root/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.8.0-29-generic
npm ERR! command "node" "/usr/bin/npm" "install" "-g" "yo"
npm ERR! cwd /root
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! message No compatible version found: yo
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! /root/npm-debug.log
my node version is, v0.6.12,
my npm version is, 1.1.4
Help will be mush appreciated.