I'm Appium new user I have some error ,when I use the NPM command (linux),I have update my ("nvm" and "npm" )version.
I'm follow Click [here](How to setup Appium in Ubuntu for android " to setup my appium.
How can I do for next step!
root#hauying-yoga-linux:/home/hauying# npm install -g grunt-cli
npm ERR! TypeError: Cannot read property 'match' of undefined
npm ERR! at Unpack.extractOpts.filter
(/usr/share/npm/lib/utils/tar.js:245:19)
npm ERR! at Unpack.[consumeHeader]
(/usr/lib/nodejs/tar/lib/parse.js:134:48)
npm ERR! at Unpack.[consumeChunkSub]
(/usr/lib/nodejs/tar/lib/parse.js:385:30)
npm ERR! at Unpack.[consumeChunk]
(/usr/lib/nodejs/tar/lib/parse.js:362:30)
npm ERR! at Unpack.write
(/usr/lib/nodejs/tar/lib/parse.js:309:25)
npm ERR! at Unzip.ondata (_stream_readable.js:667:20)
npm ERR! at Unzip.emit (events.js:189:13)
npm ERR! at addChunk (_stream_readable.js:284:12)
npm ERR! at readableAddChunk (_stream_readable.js:265:11)
npm ERR! at Unzip.Readable.push (_stream_readable.js:220:10)
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.19.37-5rodete4-amd64
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g"
"grunt-cli"
npm ERR! cwd /home/hauying
npm ERR! node -v v10.15.2
npm ERR! npm -v 1.4.21
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/hauying/npm-debug.log
npm ERR! not ok code 0
root#hauying-yoga-linux:/home/hauying#
I'm fixed.
because my node and npm version too old , I'm update my document will install in my computer.
Related
When i am trying to install package i'm getting this error. In addition all other packages were installed without any problems. How could i solve this. If i'm changing flag to -g (globally) it works, but i need it to be in my project
npm install --save express-validator
npm http GET https://registry.npmjs.org/express-validator
npm http 304 https://registry.npmjs.org/express-validator
npm http GET https://registry.npmjs.org/lodash
npm http GET https://registry.npmjs.org/validator
npm http 304 https://registry.npmjs.org/lodash
npm http 304 https://registry.npmjs.org/validator
npm http GET https://registry.npmjs.org/types/bluebird
npm http GET https://registry.npmjs.org/types/express
npm http 404 https://registry.npmjs.org/types/bluebird
npm ERR! TypeError: Cannot read property 'latest' of undefined
npm ERR! at next (/usr/share/npm/lib/cache.js:687:35)
npm ERR! at /usr/share/npm/lib/cache.js:675:5
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 3.19.0-30-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "--save" "express-validator"
npm ERR! cwd /home/prog/work/appJS
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! type non_object_property_load
npm http 404 https://registry.npmjs.org/types/express
npm ERR! TypeError: Cannot read property 'latest' of undefined
npm ERR! at next (/usr/share/npm/lib/cache.js:687:35)
npm ERR! at /usr/share/npm/lib/cache.js:675:5
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 3.19.0-30-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "--save" "express-validator"
npm ERR! cwd /home/prog/work/appJS
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! type non_object_property_load
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/prog/work/appJS/npm-debug.log
npm ERR! not ok code 0
This occurs when ur npm version is down or the library has been removed.
you need to update your npm version...!!
npm update npm#latest
sudo npm install devtool -g
Password:
/usr/local/bin/devtool -> /usr/local/lib/node_modules/devtool/bin/index.js
> fsevents#1.1.1 install /usr/local/lib/node_modules/devtool/node_modules/fsevents
> node install
[fsevents] Success: "/usr/local/lib/node_modules/devtool/node_modules/fsevents/lib/binding/Release/node-v51-darwin-x64/fse.node" is installed via remote
> electron#1.4.15 postinstall /usr/local/lib/node_modules/devtool/node_modules/electron
> node install.js
/usr/local/lib/node_modules/devtool/node_modules/electron/install.js:46
throw err
^
Error: EACCES: permission denied, link '/usr/local/lib/node_modules/devtool/node_modules/electron/electron-tmp-download-1555-1488050976880/SHASUMS256.txt' -> '/Users/sheepyellow/.electron/SHASUMS256.txt-1.4.15'
/usr/local/lib
└── (empty)
npm ERR! Darwin 16.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "devtool" "-g"
npm ERR! node v7.6.0
npm ERR! npm v4.3.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! electron#1.4.15 postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron#1.4.15 postinstall script 'node install.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the electron package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs electron
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls electron
npm ERR! There is likely additional logging output above.
I tried to install and use npm in two ways, but I get only errors.
Installing npm by normal way:
vagrant#precise64:~$ npm install
npm ERR! Couldn't read dependencies.
npm ERR! Error: ENOENT, no such file or directory '/home/vagrant/package.json'
npm ERR! You may report this log at:
npm ERR! <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR! reportbug --attach /home/vagrant/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.2.0-23-generic
npm ERR! command "node" "/usr/bin/npm" "install"
npm ERR! cwd /home/vagrant
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! path /home/vagrant/package.json
npm ERR! code ENOENT
npm ERR! message ENOENT, no such file or directory '/home/vagrant/package.json'
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/vagrant/npm-debug.log
npm not ok
Trying to install latest version:
vagrant#precise64:~$ npm install -g npm#latest
npm http GET https://registry.npmjs.org/npm
npm ERR! Error: failed to fetch from registry: npm
npm ERR! at /usr/share/npm/lib/utils/npm-registry-client/get.js:139:12
npm ERR! at cb (/usr/share/npm/lib/utils/npm-registry-client/request.js:31:9)
npm ERR! at Request._callback (/usr/share/npm/lib/utils/npm-registry-client/request.js:136:18)
npm ERR! at Request.callback (/usr/lib/nodejs/request/main.js:119:22)
npm ERR! at Request.<anonymous> (/usr/lib/nodejs/request/main.js:212:58)
npm ERR! at Request.emit (events.js:88:20)
npm ERR! at ClientRequest.<anonymous> (/usr/lib/nodejs/request/main.js:412:12)
npm ERR! at ClientRequest.emit (events.js:67:17)
npm ERR! at HTTPParser.onIncoming (http.js:1261:11)
npm ERR! at HTTPParser.onHeadersComplete (http.js:102:31)
npm ERR! You may report this log at:
npm ERR! <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR! reportbug --attach /home/vagrant/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.2.0-23-generic
npm ERR! command "node" "/usr/bin/npm" "install" "-g" "npm#latest"
npm ERR! cwd /home/vagrant
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! message failed to fetch from registry: npm
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/vagrant/npm-debug.log
npm not ok
What should I install before to create this package.json file ane make it work?
npm looks like it's already installed. Go to your project root and:
npm init
It'll walk you through making a package.json file, then you can
npm i whateverpackageyouwant
to your heart's content.
I tried installing browserify (npm module).. I got following error-
praful#ubuntu:~/terminalcloud$ npm install -g browserify
npm http GET https://registry.npmjs.org/browserify
npm ERR! Error: failed to fetch from registry: browserify
npm ERR! at /usr/share/npm/lib/utils/npm-registry-client/get.js:139:12
npm ERR! at cb (/usr/share/npm/lib/utils/npm-registry-client/request.js:31:9)
npm ERR! at Request._callback (/usr/share/npm/lib/utils/npm-registry-client /request.js:136:18)
npm ERR! at Request.callback (/usr/lib/nodejs/request/main.js:119:22)
npm ERR! at Request.<anonymous> (/usr/lib/nodejs/request/main.js:212:58)
npm ERR! at Request.emit (events.js:88:20)
npm ERR! at ClientRequest.<anonymous> (/usr/lib/nodejs/request/main.js:412:12)
npm ERR! at ClientRequest.emit (events.js:67:17)
npm ERR! at HTTPParser.onIncoming (http.js:1261:11)
npm ERR! at HTTPParser.onHeadersComplete (http.js:102:31)
npm ERR! You may report this log at:
npm ERR! <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR! reportbug --attach /home/praful/terminalcloud/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.8.0-29-generic
npm ERR! command "node" "/usr/bin/npm" "install" "-g" "browserify"
npm ERR! cwd /home/praful/terminalcloud
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! message failed to fetch from registry: browserify
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/praful/terminalcloud/npm-debug.log
npm not ok
I have installed npm package properly. This error occurs for any package that I try installing with npm. What should I do to?
Just wondering, have you tried
npm config set registry http://registry.npmjs.org/
as per this
The probleme comes from the registry you are using, it is using a secure connection with the hyper transfert text protocol, that might screw things up. https://registry.npmjs.org/browserify
you should use a simple registry that is easy fetchable :
sudo npm config set registry http://registry.npmjs.org/
on my Ubuntu. I tried installing the browser plugin from chrome just as the website says to execute.
npm install dalek-browser-chrome --save-dev
problem is I get this error when running the command.
> dalek-browser-chrome#0.0.9 install /home/monece/Desktop/dalekjs/node_modules/dalek-browser-chrome
> node install.js
Chromedriver installation failed Error: EACCES, permission denied '/home/monece/tmp/chromedriver'
at Object.fs.mkdirSync (fs.js:642:18)
at mkdir (/home/monece/Desktop/dalekjs/node_modules/dalek-browser-chrome/install.js:156:8)
at Promise._successFn (/home/monece/Desktop/dalekjs/node_modules/dalek-browser-chrome/install.js:177:7)
at Promise._withInput (/home/monece/Desktop/dalekjs/node_modules/dalek-browser-chrome/node_modules/kew/kew.js:248:25)
at Promise._chainPromise (/home/monece/Desktop/dalekjs/node_modules/dalek-browser-chrome/node_modules/kew/kew.js:290:13)
at Promise.then (/home/monece/Desktop/dalekjs/node_modules/dalek-browser-chrome/node_modules/kew/kew.js:154:13)
at /home/monece/Desktop/dalekjs/node_modules/dalek-browser-chrome/install.js:175:23
at /home/monece/Desktop/dalekjs/node_modules/dalek-browser-chrome/node_modules/npmconf/npmconf.js:76:7
at Array.forEach (native)
at /home/monece/Desktop/dalekjs/node_modules/dalek-browser-chrome/node_modules/npmconf/npmconf.js:75:13
npm ERR! dalek-browser-chrome#0.0.9 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the dalek-browser-chrome#0.0.9 install script.
npm ERR! This is most likely a problem with the dalek-browser-chrome package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get their info via:
npm ERR! npm owner ls dalek-browser-chrome
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.11.0-15-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "dalek-browser-chrome" "--save-dev"
npm ERR! cwd /home/monece/Desktop/dalekjs
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.24
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/monece/Desktop/dalekjs/npm-debug.log
npm ERR! not ok code 0
p.s. I also tried using sudo npm install and it still doesnt not work