Why isn't Angular2 part of my replicated npm repository? - node.js

I successfully managed to get a private npm server up and running, which resides inside a Ubuntu VM on my Windows 10 machine.
I replicated the npm repository using https://skimdb.npmjs.com/registry as a source for CouchDB and can query packages such as jquery from my Windows 10 machine just fine.
PS D:\Sources\NodeJS\test> npm view jquery
{ name: 'jquery',
description: 'JavaScript library for DOM operations',
'dist-tags': { beta: '3.0.0-rc1', latest: '2.2.4' },
...
gitHead: 'c0185ab7c75aab88762c5aae780b9d83b80eda72',
dist:
{ shasum: '2c89d6889b5eac522a7eea32c14521559c6cbf02',
tarball: 'http://registry.npmjs.org/jquery/-/jquery-2.2.4.tgz' },
directories: {} }
However, all of the #angular/* packages appear to be missing. If I point npm to skimdb directly I get the exact same result, so it can't be a problem with replication.
PS D:\Sources\NodeJS\test> npm view #angular/common
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "view" "#angular/common"
npm ERR! node v5.9.1
npm ERR! npm v3.7.3
npm ERR! code E404
npm ERR! 404 Not Found: #angular/common
npm ERR! 404
npm ERR! 404 '#angular/common' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! Please include the following file with any support request:
npm ERR! D:\Sources\NodeJS\test\npm-debug.log
Is this the proper registry to start with?

Ok, this appears to boil down to scoped packages where #angular is some kind of namespace.
I solved this problem by pointing to the official repository for packages from the #angular scope, i.e. my .npmrc now looks as follows:
registry=http://<couchdb server ip>:5984/registry/_design/app/_rewrite
#angular:registry=https://registry.npmjs.org/

Related

'#sailshq/socket.io-redis#latest' is not in the npm registry

Node version: 10.16.0
Sails version (sails): 1.2.3
When I try to create new project using sails cli it just gives me below error and I can not do anything.
And I see there is a package https://www.npmjs.com/package/socket.io-redis but it doesn't have #sailshq prefix in the package name.
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/#sailshq%2fsocket.io-redis - Not Found
npm ERR! 404
npm ERR! 404 '#sailshq/socket.io-redis#latest' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
Can someone help me please?
Thanks
Maybe you should use npm i #sailshq/socket.io-redis?
https://www.npmjs.com/package/#sailshq/socket.io-redis

Consuming node module in a tar file exposed by team city artifact

So there is currently a team city server which packages a node module for internal use and exposes it via an artifact. The artifact is a tar.gzfile which contains package.json, dist/**/*, readme.md files/folders.
In my package.json dependencies (for a dependent package) I have something like:
"some-module": "http://some-address/guestAuth/repository/download/some-project/.lastSuccessful/some-module.tar.gz"
Which resolves correctly to the tar.gz file, and I can download and open it all fine when doing it manually. However the odd thing is that when I do an npm install npm blows up with the error:
npm ERR! tar.unpack untar error C:\Users\Blah\AppData\Local\Temp\npm-10684-84325da0\some-server\guestAuth\repository\download\some-project\.lastSuccessful\some-module.tar.gz
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v4.2.6
npm ERR! npm v3.5.3
npm ERR! path C:\Users\Blah\AppData\Local\Temp\npm-10684-84325da0\unpack-f18f9e1b
npm ERR! code EEXIST
npm ERR! errno -4075
npm ERR! syscall mkdir
npm ERR! EEXIST: file already exists, mkdir 'C:\Users\Blah\AppData\Local\Temp\npm-10684-84325da0\unpack-f18f9e1b'
npm ERR! File exists: C:\Users\Blah\AppData\Local\Temp\npm-10684-84325da0\unpack-f18f9e1b
npm ERR! Move it away, and try again.
I am super confused as I have tried doing npm cache clean and deleting my temp folder in the appdata/local nothing seems to stop this error.
I have looked over lots of related issues like:
https://github.com/npm/npm/issues/6309
https://github.com/npm/npm/issues/5133
However nothing seems to work, I am on windows 10 64-bit using npm 3.5.3 and node 4.2.6.
Has anyone else achieved the same sort of thing or is there something I am missing here as it is a blocker on a current project and none of us seem to have any idea why its blowing up.
Solved it.
So the issue was that I was not putting a containing folder in my tar file, so if you add a root folder and have your package and other files underneath that, it all works.

why do I get ERR 404 on 'npm install ibmconfig'? #bluemix nodejs server

I downloaded my IBM bluemix nodeJS app, and trying to install all the dependencies of the project. For some reason, ibmconfig is throwing an exception. However, the URL works fine from the browser. Looks like a npm registry exception.This module is a dependency for ibmsecurity.
Here is the package.json dependency content:
"dependencies": {
"express": "4.*",
"body-parser": "*",
"ibmsecurity": "*",
"twilio": "*",
"ibmbluemix":"*",
"ibmdata":"*"
}
Here is the 404 exception:
npm WARN package.json # license should be a valid SPDX license expression
npm ERR! Darwin 14.4.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "ibmconfig"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code E404
npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/ibmconfig
npm ERR! 404
npm ERR! 404 'ibmconfig' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! Please include the following file with any support request:
Thanks for your help
Although that registry file still exists, if you go to the ibmconfig package page you'll see that it does not exist. I suspect that the package has been unpublished. You may have to contact the original maintainer to find out what happened.
Review of the ibmsecurity npm package's Git log for the package.json file, it looks like the dependency on an ibmconfig package was removed on 2015-07-29. You may need to update the package with npm update ibmsecurity
You will only see this error if you use the beta version of ibmsecurity (0.3.x). Change your dependency to use "latest" or "1.0.x" and you will not have this problem.

Can't run npm install in an Ember CLI application?

I am setting up an Ember application on a new laptop. I installed node, npm through brew and I also have the Ember CLI. Within the Ember CLI app, I'm trying to do an npm install but when I do, I get this error in the terminal:
npm WARN package.json npm#1.4.21 Non-dependency in bundleDependencies: inherits
npm ERR! Darwin 14.0.0
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.10.33
npm ERR! npm v2.1.11
npm ERR! code E404
npm ERR! 404 Not Found: expresss
npm ERR! 404
npm ERR! 404 'expresss' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of 'ember-cli'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/Nagarjun/Code/sumo-list/web-client/npm-debug.log
I can't run my projects until this is resolved. What am I missing? I even Googled but couldn't find anything for expresss.
My guess is 'expresss' (with an extra s) is a package on npm that was pulled. The dependency was in fact listed in the package.json file for ember-cli but I don't think anyone ever noticed it until later versions.
Proof: https://github.com/stefanpenner/ember-cli/blob/ec8a6ab898599746bddbb8f72f7633c29f0ee95b/package.json#L58
I was able to resolve this issue by uninstalling node and npm completely using brew. Then, installing node.js using the package from nodejs.org. Now, my npm version is 1.4.28. Looks like the issue was caused by the newer npm 2.1.10. Not sure why brew automatically picks up the new npm.
Look in your package.json dependencies section. Looks like a typo.
I faced the same issue but it got fixed by running sudo npm install -g ember-cli

NPM Update failing for private repo

I have an express project that accesses some common node code that I keep in a private repository in github. I have a line like the following in my package.json file
git+ssh://git#github.com:MYGITHUBACCT/MYPROJECT.git#master
When I run npm install, everything works correctly and it pulls my common code from the private repo and places it in my node_modules directory. However, when I run npm update, it fails on my private repo and displays the following:
npm ERR! 404 'MYPROJECT' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, or http url, or git url.
npm ERR! System Darwin 12.2.0
npm ERR! command "node" "/usr/local/bin/npm" "update"
npm ERR! cwd /Users/ginnyd/dev/gg-web
npm ERR! node -v v0.8.16
npm ERR! npm -v 1.1.69
npm ERR! code E404
Is there anything special I need to do in the package.json so that I can run the update and have it pull from GitHub?
Thanks
Ginny
Apparently, this is still an open issue with npm.
Meanwhile, to update git dependencies, you have to remove them first and then doing an npm install.
rm -rf node_modules/MYPROJECT
npm install
This have fixed in npm, please upgrade to npm >= 1.3.10
Sample usage
"dependencies": {
"thing": "git://github.com/myGitHubRepo/repo.js.git#56477cb",
}
Some day later
"dependencies": {
"thing": "git://github.com/myGitHubRepo/repo.js.git#67f90b5",
}
Then npm install again and you will get new ref!
If your "myGitHubRepo/repo.js" is a private package you should set "private": true there to ensure it doesn't get accidentally published to npm registry

Resources