NPM: Registry is missing - javascript

npm http GET https://registry.npmjs.org/n
npm ERR! Error: failed to fetch from registry: n
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:209:10)
npm ERR! at ClientRequest.emit (events.js:67:17)
npm ERR! at CleartextStream.<anonymous> (http.js:1137:11)
npm ERR! at CleartextStream.emit (events.js:67:17)
npm ERR! You may report this log at:
npm ERR! <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR! reportbug --attach /var/www/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.2.0-58-generic
npm ERR! command "node" "/usr/bin/npm" "install" "-g" "n"
npm ERR! cwd /var/www
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! message failed to fetch from registry: n
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /var/www/npm-debug.log
npm not ok
I was trying to update the nodejs installation but i couldn't.
I followed the steps here.

Ok so i have answered my own question.
Aparently sudo apt-get install nodejs directly from the repository would only give you a maximum of v.0.06.
So what i did was the following
https://launchpad.net/~chris-lea/+archive/node.js/
i added the PPA, then did the whole install nodejs again.
Afterwhich, the version is now v.0.10
Hope this would help anyone in my case.

Related

NPM Error: Cannot find module 'node-bin-darwin-arm64/package.json' fixes on the internet not working

I tried node V16 and V17 from the website, from n and from nvm with arch. I deleted the node_modules folder, but nothing.
I'm using a M1 macbook pro
Error when running npm i:
npm ERR! code 1
npm ERR! path /Users/redacted/Library/CloudStorage/OneDrive-Personal/Software/Code/Discord-Bots/DijkendamDiscordBot/node_modules/node
npm ERR! command failed
npm ERR! command sh -c node installArchSpecificPackage
npm ERR! npm ERR! code ETARGET
npm ERR! npm ERR! notarget No matching version found for node-darwin-arm64#16.13.2.
npm ERR! npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! npm ERR! notarget a package version that doesn't exist.
npm ERR!
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR! /Users/redacted/.npm/_logs/2022-02-11T23_06_22_932Z-debug-0.log
npm ERR! node:internal/modules/cjs/loader:936
npm ERR! throw err;
npm ERR! ^
npm ERR!
npm ERR! Error: Cannot find module 'node-bin-darwin-arm64/package.json'
npm ERR! Require stack:
npm ERR! - /Users/redacted/Library/CloudStorage/OneDrive-Personal/Software/Code/Discord-Bots/DijkendamDiscordBot/node_modules/node/installArchSpecificPackage.js
npm ERR! at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
npm ERR! at Function.resolve (node:internal/modules/cjs/helpers:108:19)
npm ERR! at ChildProcess.<anonymous> (/Users/redacted/Library/CloudStorage/OneDrive-Personal/Software/Code/Discord-Bots/DijkendamDiscordBot/node_modules/node-bin-setup/index.js:19:27)
npm ERR! at ChildProcess.emit (node:events:520:28)
npm ERR! at maybeClose (node:internal/child_process:1092:16)
npm ERR! at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) {
npm ERR! code: 'MODULE_NOT_FOUND',
npm ERR! requireStack: [
npm ERR! '/Users/redacted/Library/CloudStorage/OneDrive-Personal/Software/Code/Discord-Bots/DijkendamDiscordBot/node_modules/node/installArchSpecificPackage.js'
npm ERR! ]
npm ERR! }
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/redacted/.npm/_logs/2022-02-11T23_06_18_606Z-debug-0.log
Please help i have tried everything i could find!

Node.js npm install express - can't install express, error CERT_UNTRUSTED

I'm trying to install express on Raspberry Pi because I wanto to use it for REST API. The problem is that I get following message and any solution that I found on this site doesn't work.
npm http GET https://registry.npmjs.org/express
npm ERR! Error: SSL Error: CERT_UNTRUSTED
npm ERR! at ClientRequest.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/main.js:525:26)
npm ERR! at ClientRequest.g (events.js:192:14)
npm ERR! at ClientRequest.EventEmitter.emit (events.js:96:17)
npm ERR! at HTTPParser.parserOnIncomingClient [as onIncoming] (http.js:1582:7)
npm ERR! at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:111:23)
npm ERR! at CleartextStream.socketOnData [as ondata] (http.js:1485:20)
npm ERR! at CleartextStream.CryptoStream._push (tls.js:544:27)
npm ERR! at SecurePair.cycle (tls.js:898:20)
npm ERR! at EncryptedStream.CryptoStream.write (tls.js:285:13)
npm ERR! at Socket.ondata (stream.js:38:26)
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.14.62-v7+
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "express" "--save"
npm ERR! cwd /usr/local/myapp
npm ERR! node -v v0.8.21
npm ERR! npm -v 1.2.11
npm ERR! code ESSL
npm ERR! Error: EACCES, open 'npm-debug.log'
npm ERR! { [Error: EACCES, open 'npm-debug.log'] errno: 3, code: 'EACCES', path: 'npm-debug.log' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Linux 4.14.62-v7+
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "express" "--save"
npm ERR! cwd /usr/local/myapp
npm ERR! node -v v0.8.21
npm ERR! npm -v 1.2.11
npm ERR! path npm-debug.log
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, open 'npm-debug.log'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /usr/local/myapp/npm-debug.log
npm ERR! not ok code 0
Here are some commands that people asked about in other threads :
npm version
http_parser: '1.0',
node: '0.8.21',
v8: '3.11.10.25',
ares: '1.7.5-DEV',
uv: '0.8',
zlib: '1.2.3',
openssl: '1.0.0f',
npm: '1.2.11' }
npm list
pi#raspberrypi:/usr/local/myapp $ npm list
/usr/local/myapp
└── (empty)
I also tried to clear cache but nothing works and I'm stuck.
Thanks for help in advance.
Try this:
npm config set ca ""

Installation of imagemagick-native node with linuxbrew

I am trying to install imagemagick-native. It will through an error
i am using command to install.
npm install imagemaick-native --save
> imagemagick-native#1.9.3 install /home/kspx/Desktop/MyData/Projects/Node/vcc-api/node_modules/imagemagick-native
> node-gyp rebuild
/bin/sh: 1: Magick++-config: not found
gyp: Call to 'Magick++-config --ldflags --libs' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/home/kspx/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:308:16)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:12)
gyp ERR! System Linux 4.4.0-75-generic
gyp ERR! command "/usr/bin/nodejs" "/home/kspx/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/kspx/Desktop/MyData/Projects/Node/vcc-api/node_modules/imagemagick-native
gyp ERR! node -v v4.8.3
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok
WARN VinCompass#0.0.1 No description
npm WARN VinCompass#0.0.1 No repository field.
npm WARN VinCompass#0.0.1 No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! imagemagick-native#1.9.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the imagemagick-native#1.9.3 install script 'node-gyp rebuild'.
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 imagemagick-native package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs imagemagick-native
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls imagemagick-native
npm ERR! There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/kspx/.npm/_logs/2017-05-15T05_30_58_940Z-debug.log
please guys give me the solution. how can I fix this problem?
i was try all the ubuntu commond. even I update node and npm to latest version. atill Getting the sam error.
As per documentation.
Install ImageMagick with headers before installing this module. Tested with ImageMagick 6.7.7 on CentOS 6 and Mac OS X Lion, Ubuntu 12.04 .
brew install imagemagick
or
sudo yum install ImageMagick-c++ ImageMagick-c++-devel
or
sudo apt-get install libmagick++-dev
Make sure you can find Magick++-config in your PATH. Packages on some newer distributions, such as Ubuntu 16.04, might be missing a link into /usr/bin. If that is the case, do this.
sudo ln -s `ls /usr/lib/\`uname -p\`-linux-gnu/ImageMagick-*/bin-Q16/Magick++-config | head -n 1` /usr/local/bin/
Then do :
npm install imagemagick-native

error when install node modules ---common.gypi not found

when I run npm install , the node modules included in the package.json should be installed, however, there are following errors:
npm http 304 https://registry.npmjs.org/zeparser/0.0.5
npm http GET https://registry.npmjs.org/commander
npm http GET https://registry.npmjs.org/tinycolor
npm http GET https://registry.npmjs.org/options
gyp: C:\Documents and Settings\Jicheng An\.node-gyp\0.10.5\common.gypi not found (cwd: c:\Documents and Settings\Jicheng An\csfv_cms_module\node_modules\csfv_misc_module\node_modules\email-templates\node_modules\juice\node_modules\jsdom\node_modules\contextify) while reading includes of binding.gyp while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (h:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:415:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:784:12)
gyp ERR! System Windows_NT 5.1.2600
gyp ERR! command "node" "h:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd c:\Documents and Settings\Jicheng An\csfv_cms_module\node_modules\csfv_misc_module\node_modules\email-templates\node_modules\juice\node_modules\jsdom\node_modules\contextify
gyp ERR! node -v v0.10.5
gyp ERR! node-gyp -v v0.9.5
gyp ERR! not ok
npm http 304 https://registry.npmjs.org/tinycolor
npm http 304 https://registry.npmjs.org/options
npm http 304 https://registry.npmjs.org/commander
npm ERR! Error: ENOENT, lstat 'c:\Documents and Settings\Jicheng An\csfv_cms_module\node_modules\csfv_misc_module\node_modules\email-templates\node_modules\juice\node_modules\jsdom\node_modules\cssstyle\lib\properties\borderBottomWidth.js'
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 5.1.2600
npm ERR! command "h:\\Program Files\\nodejs\\node.exe" "h:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "i"
npm ERR! cwd c:\Documents and Settings\Jicheng An\csfv_cms_module
npm ERR! node -v v0.10.5
npm ERR! npm -v 1.2.18
npm ERR! path c:\Documents and Settings\Jicheng An\csfv_cms_module\node_modules\csfv_misc_module\node_modules\email-templates\node_modules\juice\node_modules\jsdom\node_modules\cssstyle\lib\properties\borderBottomWidth.js
npm ERR! fstream_path c:\Documents and Settings\Jicheng An\csfv_cms_module\node_modules\csfv_misc_module\node_modules\email-templates\node_modules\juice\node_modules\jsdom\node_modules\cssstyle\lib\properties\borderBottomWidth.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack h:\Program Files\nodejs\node_modules\npm\node_modules\fstream\lib\writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! contextify#0.1.6 install: `node-gyp rebuild`
npm ERR! `cmd "/c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the contextify#0.1.6 install script.
npm ERR! This is most likely a problem with the contextify package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls contextify
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 5.1.2600
npm ERR! command "h:\\Program Files\\nodejs\\node.exe" "h:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "i"
npm ERR! cwd c:\Documents and Settings\Jicheng An\csfv_cms_module
npm ERR! node -v v0.10.5
npm ERR! npm -v 1.2.18
npm ERR! code ELIFECYCLE
npm WARN engine mong.socket.io#0.9.0: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.5","npm":"1.2.18"})
npm http GET https://registry.npmjs.org/passport-openid
npm http GET https://registry.npmjs.org/pkginfo
npm http GET https://registry.npmjs.org/passport-oauth
npm http GET https://registry.npmjs.org/passport-oauth
I don't know what the common.gypi is and why the error happens.
can anyone help me to resolve this problem ?
I believe you module require compilation, most of the modules in npm have precompiled binaries for Win Mac Linux, but this one require compilation with node-gyp. https://github.com/TooTallNate/node-gyp
For Windows it will actually create .sln and .cxproj files for C source files of the module.
And it will do this using Python. After that it will run msbuild to build the solution.
You will need Visual Studio at least express in this case

Global installation of grunt.js fails

I could install gruntjs locally using npm install grunt.
But when I'm trying to install it globally npm install grunt -g, i'm getting an error:
npm ERR! Error: EACCES, symlink '../lib/node_modules/grunt/bin/grunt'
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR!
npm ERR! System Linux 2.6.18-92.el5xen
npm ERR! command "nodejs" "/usr/bin/npm" "install" "grunt" "-g"
npm ERR! cwd /home/lj
npm ERR! node -v v0.6.18
npm ERR! npm -v 1.1.19
npm ERR! path ../lib/node_modules/grunt/bin/grunt
npm ERR! code EACCES
npm ERR! message EACCES, symlink '../lib/node_modules/grunt/bin/grunt'
npm ERR! errno {}
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 2.6.18-92.el5xen
npm ERR! command "nodejs" "/usr/bin/npm" "install" "grunt" "-g"
npm ERR! cwd /home/lj
npm ERR! node -v v0.6.18
npm ERR! npm -v 1.1.19
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/lj/npm-debug.log
npm not ok
With sudo I have error too:
npm ERR! Error: spawn ENOENT
npm ERR! at errnoException (child_process.js:483:11)
npm ERR! at ChildProcess.spawn (child_process.js:446:11)
npm ERR! at child_process.js:342:9
npm ERR! at Object.execFile (child_process.js:252:15)
npm ERR! at uidNumber (/usr/lib/nodejs/uid-number/uid-number.js:33:17)
npm ERR! at loadUid (/usr/lib/nodejs/npm/lib/npm.js:336:5)
npm ERR! at Array.2 (/usr/lib/nodejs/bind-actor.js:15:8)
npm ERR! at LOOP (/usr/lib/nodejs/chain.js:15:13)
npm ERR! at /usr/lib/nodejs/chain.js:18:7
npm ERR! at setUser (/usr/lib/nodejs/npm/lib/npm.js:346:32)
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 2.6.18-92.el5xen
npm ERR! command "nodejs" "/usr/bin/npm" "install" "grunt" "-g"
npm ERR! cwd /home/lj
npm ERR! node -v v0.6.18
npm ERR! npm -v 1.1.19
npm ERR! syscall spawn
npm ERR! code ENOENT
npm ERR! message spawn ENOENT
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/lj/npm-debug.log
npm not ok
What could I do to install it?
P.S. It's possible that come rights for some folders is for root:root, not for my user. Cuz our admins installed VM that way...
I've had this problem too with grunt and bower
The solution I've found is in this article NPM config
In your .npmrc you need to set the prefix path
prefix = /usr/local
or you can do it from terminal like this:
npm config set prefix "/usr/local"
This way node will know where to install them:
In npm 1.0, there are two ways to install things:
globally —- This drops modules in {prefix}/lib/node_modules, and puts executable files in {prefix}/bin, where {prefix} is usually something like /usr/local. It also installs man pages in {prefix}/share/man, if they’re supplied.
locally —- This installs your package in the current working directory. Node modules go in ./node_modules, executables go in ./node_modules/.bin/, and man pages aren’t installed at all.
Try chowning the node_modules folder and then try to install again:
sudo chown -R $USER /path/to/node_modules/folder
Encountered same issue. The following works for me:
sudo npm install -g grunt-cli
try sudo npm install -g grunt ?
Adding the option --no-bin-links works good. I tried everything and only this solved my problem. I was installing the Yeoman on ubuntu 12.04 and it was always returning the error:
npm ERR! Error: EACCES, symlink '../lib/node_modules/yo/cli.js'
Then, I did:
npm install -g --no-bin-links yo
=D
For more details https://github.com/isaacs/npm/issues/2380

Categories