npm ERR! Protocol "https:" not supported. Expected "http:" - npm-install

While installing no-kafka I got an error. Can anyone help how to fix this issue?
C:\Kafka-node>npm install no-kafka
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\Program Files (x86)\nodejs\node.exe" "C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js" "install" "no-kafka"
npm ERR! node v4.2.4
npm ERR! npm v2.14.12
npm ERR! Protocol "https:" not supported. Expected "http:".
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues
npm ERR! Please include the following file with any support request:
npm ERR! C:\Kafka-node\npm-debug.log

Below command fixed the issue
set http_proxy=http://registry.npmjs.org/

Related

I get this error when I use npm install npm ERR! Windows_NT 10.0.19041

I'm getting this error when I run npm install, even when I try to upgrade my npm I get this error
npm ERR! Windows_NT 10.0.19041
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\jaydev\Desktop\Testreact\node_modules\npm\bin\npm-cli.js" "i"
npm ERR! node v14.15.3
npm ERR! npm v3.10.10
npm ERR! cb.apply is not a function
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues
npm ERR! Please include the following file with any support request:
npm ERR! C:\WINDOWS\system32\npm-debug.log
I'm using node v12, I have the same error, but I fix it by:
go to C:\Users\username find and delete folder '~
go to your\project\folder find and delete folder '~
re-open command prompt
install again
I'm not sure that it work for you your node version, But it work for me, I hope that can help you.

Npm compiler : Cannot read property 'startsWith' of undefined

I did setup https://github.com/vuejs/vue-cli Vue CLI with the webpack template and it works fine.
But when i change something in template file it throws below error.
Kindly help on the below issue,
> Starting dev server...
DONE Compiled successfully in 2703ms 6:00:35 PM
> Listening at http://localhost:8083
WAIT Compiling... 6:01:05 PM
c:\xampp\htdocs\myproject\node_modules\enhanced-resolve\lib\CachedInputFileSy
stem.js:145
if(key.startsWith(what))
^
TypeError: Cannot read property 'startsWith' of undefined
at Storage.purge (c:\xampp\htdocs\myproject\node_modules\enhanced-resolve
\lib\CachedInputFileSystem.js:145:10)
at Storage.purge (c:\xampp\htdocs\myproject\node_modules\enhanced-resolve
\lib\CachedInputFileSystem.js:150:9)
at CachedInputFileSystem.purge (c:\xampp\htdocs\myproject\node_modules\en
hanced-resolve\lib\CachedInputFileSystem.js:259:20)
at EventEmitter.watcher.once (c:\xampp\htdocs\myproject\node_modules\webp
ack\lib\node\NodeWatchFileSystem.js:42:26)
at EventEmitter.g (events.js:291:16)
at emitTwo (events.js:106:13)
at EventEmitter.emit (events.js:191:7)
at EventEmitter._onTimeout (c:\xampp\htdocs\myproject\node_modules\watchp
ack\lib\watchpack.js:142:7)
at ontimeout (timers.js:380:14)
at tryOnTimeout (timers.js:244:5)
at Timer.listOnTimeout (timers.js:214:5)
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Program Files (x8
6)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev"
npm ERR! node v6.10.2
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! dktrgo#1.0.0 dev: `node build/dev-server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the dktrgo#1.0.0 dev script 'node build/dev-server.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 dktrgo package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node build/dev-server.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs dktrgo
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls dktrgo
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! c:\xampp\htdocs\myproject\npm-debug.log
Thank you
I was able to reproduce in v3.4.0, but not in v3.4.1 (which was released about 5 hours later).
To confirm you're on v3.4.0:
npm list enhanced-resolve
Please update enhanced-resolve to v3.4.1:
npm i enhanced-resolve

uninstall npm but 'cmd-shim' missing

I am trying to uninstall npm :
sudo npm uninstall npm
but I am getting this error :
npm ERR! Linux 4.2.0-16-generic npm ERR! argv "/usr/local/bin/node"
"/usr/local/bin/npm" "uninstall"
"npm" npm ERR! node v5.6.0 npm ERR!
npm v3.6.0 npm ERR! code MODULE_NOT_FOUND
npm ERR! Cannot find module 'cmd-shim' npm ERR! npm ERR! If you need
help, you may report this error at: npm ERR!
https://github.com/npm/npm/issues
npm ERR! Please include the following file with any support request:
npm ERR! /home/techvalley/dev/workspace/npm-debug.log
Anybody knows why?
Thank you.
Uninstall node, it should remove npm.

Stuck with Npm? npm install errors

I am having a strange problem with npm in my ubuntu 14.04. I have a package.json file in my project directory. when i try to run
npm install
it fails. It logs something like
is related to insufficient space on your system.
But i have checked that there is enough available space in my directory.
Here is the log
npm ERR! tar.unpack untar error /home/rafi/.npm/core-js/1.2.6/package.tgz
npm ERR! tar.unpack untar error /home/rafi/.npm/caniuse-db/1.0.30000384/package.tgz
npm ERR! Linux 3.16.0-49-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! path /home/rafi/Desktop/dsf.angular/node_modules/babel-plugin-transform-export-extensions/node_modules/babel-runtime/node_modules/core-js/modules/library/es6.object.to-string.js
npm ERR! code ENOSPC
npm ERR! errno -28
npm ERR! nospc ENOSPC, open '/home/rafi/Desktop/dsf.angular/node_modules/babel-plugin-transform-export-extensions/node_modules/babel-runtime/node_modules/core-js/modules/library/es6.object.to-string.js'
npm ERR! nospc This is most likely not a problem with npm itself
npm ERR! nospc and is related to insufficient space on your system.
npm ERR! Please include the following file with any support request:
Any idea what may be the problem here ?

npm publish to Artifactory not working

I have setup Artifactory according to the instructions given here, http://www.jfrog.com/confluence/display/RTF/Npm+Repositories, but on publishing a package the following is displayed:
npm http PUT http://localhost:8083/artifactory/api/npm/npm-local/UIBase
npm http 400 http://localhost:8083/artifactory/api/npm/npm-local/UIBase
npm ERR! registry error parsing json
npm ERR! publish Failed PUT response 400
npm ERR! SyntaxError: Unexpected token M
npm ERR! Missing attachments with tarball data, aborting upload for: 'UIBase'
npm ERR! at Object.parse (native)
npm ERR! at RegClient.<anonymous> (/usr/share/npm/node_modules/npm-registry-client/lib/request.js:238:23)
npm ERR! at Request.self.callback (/usr/lib/nodejs/request/index.js:148:22)
npm ERR! at Request.EventEmitter.emit (events.js:98:17)
npm ERR! at Request.<anonymous> (/usr/lib/nodejs/request/index.js:896:14)
npm ERR! at Request.EventEmitter.emit (events.js:117:20)
npm ERR! at IncomingMessage.<anonymous> (/usr/lib/nodejs/request/index.js:847:12)
npm ERR! at IncomingMessage.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-39-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "publish" "--registry" "http://localhost:8083/artifactory/api/npm/npm-local"
npm ERR! cwd /home/debjit/code/pubmatic/pub-mgmt/ui/UIBase
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! type unexpected_token
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/debjit/code/pubmatic/pub-mgmt/ui/UIBase/npm-debug.log
npm ERR! not ok code 0
The command I have used is:
npm publish --registry http://localhost:8083/artifactory/api/npm/npm-local
Artifactory logs show the following:
2014-11-19 23:15:23,541 [http-bio-8083-exec-2] [WARN ] (o.j.r.n.r.h.NpmLocalRepoHandler:192) - Missing attachments with tarball data, aborting upload for: 'UIBase'
What am I missing?
You should upgrade your npm client and use at least 1.4.3.
The reason is that the publish command has changed and Artifactory supports the newer format.