Package/registry issues while getting an existing MEAN app running locally - node.js

I'm currently trying to get an existing MEAN application up and running. However, I'm totally struggling with setting up the local environment on my mac.
I didn't create this web-app so that makes things all the more confusing.
SUMMARY
I want to get an existing web-app up and running. I installed node.js and made sure MongoDB was running. I navigated to the /server directory of my app and ran npm install. Then when I tried to run npm start I got an error that something was wrong with the package. I then ran npm bugs <package-name> and it says that <package-name> is not in the npm registry.
DETAILS
npm start gives me this npm-debug.log:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
2 info using npm#3.6.0
3 info using node#v5.7.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle groep4#0.0.1~prestart: groep4#0.0.1
6 silly lifecycle groep4#0.0.1~prestart: no script for restart, continuing
7 info lifecycle groep4#0.0.1~start: groep4#0.0.1
8 verbose lifecycle groep4#0.0.1~start: unsafe-perm in lifecycle true
9 verbose lifecycle groep4#0.0.1~start: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/Sander/Documents/game-out/server/node_modules/.bin:/Users/Sander/.rvm/gems/ruby-1.9.3-p392/bin:/Users/Sander/.rvm/gems/ruby-1.9.3-p392#global/bin:/Users/Sander/.rvm/rubies/ruby-1.9.3-p392/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/Sander/.rvm/bin
10 verbose lifecycle groep4#0.0.1~start: CWD: /Users/Sander/Documents/game-out/server
11 silly lifecycle groep4#0.0.1~start: Args: [ '-c', 'node bin/www.js' ]
12 silly lifecycle groep4#0.0.1~start: Returned: code: 1 signal: null
13 info lifecycle groep4#0.0.1~start: Failed to exec start script
14 verbose stack Error: groep4#0.0.1 start: `node bin/www.js`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:232:16)
14 verbose stack at emitTwo (events.js:100:13)
14 verbose stack at EventEmitter.emit (events.js:185:7)
14 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14)
14 verbose stack at emitTwo (events.js:100:13)
14 verbose stack at ChildProcess.emit (events.js:185:7)
14 verbose stack at maybeClose (internal/child_process.js:827:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
15 verbose pkgid groep4#0.0.1
16 verbose cwd /Users/Sander/Documents/game-out/server
17 error Darwin 15.3.0
18 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
19 error node v5.7.0
20 error npm v3.6.0
21 error code ELIFECYCLE
22 error groep4#0.0.1 start: `node bin/www.js`
22 error Exit status 1
23 error Failed at the groep4#0.0.1 start script 'node bin/www.js'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the groep4 package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error node bin/www.js
23 error You can get information on how to open an issue for this project with:
23 error npm bugs groep4
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls groep4
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
npm bugs groep4 gives me the following npm-debug.log:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'bugs', 'groep4' ]
2 info using npm#3.6.0
3 info using node#v5.7.0
4 silly fetchPackageMetaData groep4
5 silly fetchNamedPackageData groep4
6 silly mapToRegistry name groep4
7 silly mapToRegistry using default registry
8 silly mapToRegistry registry https://registry.npmjs.org/
9 silly mapToRegistry uri https://registry.npmjs.org/groep4
10 verbose request uri https://registry.npmjs.org/groep4
11 verbose request no auth needed
12 info attempt registry request try #1 at 10:01:10 PM
13 verbose request using bearer token for auth
14 verbose request id 4a6ce97af77a8f09
15 http request GET https://registry.npmjs.org/groep4
16 http 404 https://registry.npmjs.org/groep4
17 verbose headers { 'content-type': 'application/json',
17 verbose headers 'cache-control': 'max-age=0',
17 verbose headers 'content-length': '2',
17 verbose headers 'accept-ranges': 'bytes',
17 verbose headers date: 'Thu, 25 Feb 2016 21:01:11 GMT',
17 verbose headers via: '1.1 varnish',
17 verbose headers connection: 'keep-alive',
17 verbose headers 'x-served-by': 'cache-ams4146-AMS',
17 verbose headers 'x-cache': 'MISS',
17 verbose headers 'x-cache-hits': '0',
17 verbose headers 'x-timer': 'S1456434071.123107,VS0,VE697' }
18 silly get cb [ 404,
18 silly get { 'content-type': 'application/json',
18 silly get 'cache-control': 'max-age=0',
18 silly get 'content-length': '2',
18 silly get 'accept-ranges': 'bytes',
18 silly get date: 'Thu, 25 Feb 2016 21:01:11 GMT',
18 silly get via: '1.1 varnish',
18 silly get connection: 'keep-alive',
18 silly get 'x-served-by': 'cache-ams4146-AMS',
18 silly get 'x-cache': 'MISS',
18 silly get 'x-cache-hits': '0',
18 silly get 'x-timer': 'S1456434071.123107,VS0,VE697' } ]
19 silly fetchPackageMetaData Error: Registry returned 404 for GET on https://registry.npmjs.org/groep4
19 silly fetchPackageMetaData at makeError (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:264:12)
19 silly fetchPackageMetaData at CachingRegistryClient.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:242:14)
19 silly fetchPackageMetaData at Request._callback (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:172:14)
19 silly fetchPackageMetaData at Request.self.callback (/usr/local/lib/node_modules/npm/node_modules/request/request.js:198:22)
19 silly fetchPackageMetaData at emitTwo (events.js:100:13)
19 silly fetchPackageMetaData at Request.emit (events.js:185:7)
19 silly fetchPackageMetaData at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1035:10)
19 silly fetchPackageMetaData at emitOne (events.js:95:20)
19 silly fetchPackageMetaData at Request.emit (events.js:182:7)
19 silly fetchPackageMetaData at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:962:12)
19 silly fetchPackageMetaData error for groep4 { [Error: Registry returned 404 for GET on https://registry.npmjs.org/groep4] pkgid: 'groep4', statusCode: 404, code: 'E404' }
20 verbose stack Error: Registry returned 404 for GET on https://registry.npmjs.org/groep4
20 verbose stack at makeError (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:264:12)
20 verbose stack at CachingRegistryClient.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:242:14)
20 verbose stack at Request._callback (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:172:14)
20 verbose stack at Request.self.callback (/usr/local/lib/node_modules/npm/node_modules/request/request.js:198:22)
20 verbose stack at emitTwo (events.js:100:13)
20 verbose stack at Request.emit (events.js:185:7)
20 verbose stack at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1035:10)
20 verbose stack at emitOne (events.js:95:20)
20 verbose stack at Request.emit (events.js:182:7)
20 verbose stack at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:962:12)
21 verbose statusCode 404
22 verbose pkgid groep4
23 verbose cwd /Users/Sander/Documents/game-out/server
24 error Darwin 15.3.0
25 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "bugs" "groep4"
26 error node v5.7.0
27 error npm v3.6.0
28 error code E404
29 error 404 Registry returned 404 for GET on https://registry.npmjs.org/groep4
30 error 404
31 error 404 'groep4' is not in the npm registry.
32 error 404 You should bug the author to publish it (or use the name yourself!)
33 error 404 Note that you can also install from a
34 error 404 tarball, folder, http url, or git url.
35 verbose exit [ 1, true ]
As a result of this I've been reading tons of stuff about npm and packages. I tried creating a tarball from the package,json and installing that. But nothing came of it. I still got that same error when running npm start.
I've also double checked with someone who worked on this app that https://registry.npmjs.org/groep4 has never existed. So the issue isn't simply that the registry was emptied, which was my initial thought.
I managed to get a fresh MEAN stack application up and running using sudo npm install -g mean-cli and mean init yourNewApp. Then I just followed the on-screen instructions to get everything set up. It worked fine. So I'm assuming that the issue isn't with node.js or MongoDB.
I made the entire thing available via GitHub, perhaps that will give a bit of context.
I supplied every detail I could think of but please don't hesitate to ask for anything you need.

So after a lot of troubleshooting I found the answer. I'll post it here for future reference.
The error was a bit misleading since the package had nothing to do with anything. The problem was actually with the config file. The first step was to set that up correctly.
Additionally, the server should be started with node server.js and NOT npm start.
That fixed it for me. I now have the app up and running in my local environment.

Related

404 error when trying to pull from Artifactory 5.4.6 NPM repo with NPM or higher if anonymous access is disabled

I have an Artifactory NPM repo named product_release_npm, with anonymous access disabled.
At the project level, I have an .npmrc file with the following content :
#luciad:registry=https://[DOMAIN]/artifactory/api/npm/product_release_npm/
At the user level, I have an .npmrc file with the following content :
//[DOMAIN]/artifactory/api/npm/product_thirdparty_npm/:_authToken=[AUTH_TOKEN]
//[DOMAIN]/artifactory/api/npm/product_release_npm/:_authToken=[AUTH_TOKEN]
My project's package.json file looks like this :
{
"dependencies": {
"#luciad/ria-core": "^2019.0"
}
}
If I do an npm install with NPM 4.2.0 or lower, I'm able to install this repo succesfully.
If I try the same thing with NPM 5.0.0 or higher, I'm unable to install this repo and get a 404 error.
In some versions of NPM, I'm also getting a 403 error.
Here's the log when try this with NPM 5.6.0, on a Linux machine :
0 info it worked if it ends with ok
1 verbose cli [ '/home/release/nodejs/node-v8.11.1-linux-x64/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'install' ]
2 info using npm#5.6.0
3 info using node#v8.11.1
4 verbose npm-session 63d1960eac6e1e9a
5 silly install runPreinstallTopLevelLifecycles
6 silly preinstall release
7 info lifecycle #~preinstall: #
8 silly install loadCurrentTree
9 silly install readLocalPackageData
10 silly install loadIdealTree
11 silly install cloneCurrentTreeToIdealTree
12 silly install loadShrinkwrap
13 silly install loadAllDepsIntoIdealTree
14 http fetch GET 200 https://[DOMAIN]/artifactory/api/npm/product_release_npm/#luciad%2fria-core 334ms
15 http fetch GET 404 https://[DOMAIN]:443/artifactory/api/npm/product_release_npm/#luciad/ria-core/-/#luciad/ria-core-2019.0.1.tgz 32ms
16 silly fetchPackageMetaData error for #luciad/ria-core#^2019.0 404 Not Found: #luciad/ria-core#^2019.0
17 http fetch GET 404 https://[DOMAIN]:443/artifactory/api/npm/product_release_npm/#luciad/ria-core/-/#luciad/ria-core-2019.0.1.tgz 9ms
18 silly fetchPackageMetaData error for #luciad/ria-core#^2019.0 404 Not Found: #luciad/ria-core#^2019.0
19 silly saveTree release
20 verbose stack Error: 404 Not Found: #luciad/ria-core#^2019.0
20 verbose stack at fetch.then.res (/home/release/nodejs/node-v8.11.1-linux-x64/lib/node_modules/npm/node_modules/pacote/lib/fetchers/registry/fetch.js:42:19)
20 verbose stack at tryCatcher (/home/release/nodejs/node-v8.11.1-linux-x64/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
20 verbose stack at Promise._settlePromiseFromHandler (/home/release/nodejs/node-v8.11.1-linux-x64/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:512:31)
20 verbose stack at Promise._settlePromise (/home/release/nodejs/node-v8.11.1-linux-x64/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:569:18)
20 verbose stack at Promise._settlePromise0 (/home/release/nodejs/node-v8.11.1-linux-x64/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:614:10)
20 verbose stack at Promise._settlePromises (/home/release/nodejs/node-v8.11.1-linux-x64/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:693:18)
20 verbose stack at Async._drainQueue (/home/release/nodejs/node-v8.11.1-linux-x64/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:133:16)
20 verbose stack at Async._drainQueues (/home/release/nodejs/node-v8.11.1-linux-x64/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:143:10)
20 verbose stack at Immediate.Async.drainQueues (/home/release/nodejs/node-v8.11.1-linux-x64/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:17:14)
20 verbose stack at runCallback (timers.js:794:20)
20 verbose stack at tryOnImmediate (timers.js:752:5)
20 verbose stack at processImmediate [as _immediateCallback] (timers.js:729:5)
21 verbose cwd /home/release/Desktop/artifactory/release
22 verbose Linux 4.15.0-65-generic
23 verbose argv "/home/release/nodejs/node-v8.11.1-linux-x64/bin/node" "/usr/local/bin/npm" "install"
24 verbose node v8.11.1
25 verbose npm v5.6.0
26 error code E404
27 error 404 Not Found: #luciad/ria-core#^2019.0
28 verbose exit [ 1, true ]
Here's the log when try this with NPM 6.9.0, on a Windows machine :
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'install' ]
2 info using npm#6.9.0
3 info using node#v10.16.3
4 verbose npm-session e99caa5e8a2881d2
5 silly install runPreinstallTopLevelLifecycles
6 silly preinstall release
7 info lifecycle #~preinstall: #
8 silly install loadCurrentTree
9 silly install readLocalPackageData
10 timing stage:loadCurrentTree Completed in 13ms
11 silly install loadIdealTree
12 silly install cloneCurrentTreeToIdealTree
13 timing stage:loadIdealTree:cloneCurrentTree Completed in 1ms
14 silly install loadShrinkwrap
15 timing stage:loadIdealTree:loadShrinkwrap Completed in 2ms
16 silly install loadAllDepsIntoIdealTree
17 http fetch GET 304 https://[DOMAIN]/artifactory/api/npm/product_release_npm/#luciad%2fria-core 143ms
18 http fetch GET 404 https://[DOMAIN]:443/artifactory/api/npm/product_release_npm/#luciad/ria-core/-/#luciad/ria-core-2019.0.1.tgz 12ms
19 silly fetchPackageMetaData error for #luciad/ria-core#^2019.0 404 Not Found - GET https://[DOMAIN]:443/artifactory/api/npm/product_release_npm/#luciad/ria-core/-/#luciad/ria-core-2019.0.1.tgz
20 http fetch GET 404 https://[DOMAIN]:443/artifactory/api/npm/product_release_npm/#luciad/ria-core/-/#luciad/ria-core-2019.0.1.tgz 10ms
21 silly fetchPackageMetaData error for #luciad/ria-core#^2019.0 404 Not Found - GET https://[DOMAIN]:443/artifactory/api/npm/product_release_npm/#luciad/ria-core/-/#luciad/ria-core-2019.0.1.tgz
22 timing stage:rollbackFailedOptional Completed in 0ms
23 timing stage:runTopLevelLifecycles Completed in 248ms
24 silly saveTree release
25 verbose stack Error: 404 Not Found - GET https://[DOMAIN]:443/artifactory/api/npm/product_release_npm/#luciad/ria-core/-/#luciad/ria-core-2019.0.1.tgz
25 verbose stack at res.buffer.catch.then.body (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-fetch\check-response.js:104:15)
25 verbose stack at process._tickCallback (internal/process/next_tick.js:68:7)
26 verbose statusCode 404
27 verbose pkgid #luciad/ria-core#^2019.0
28 verbose cwd D:\Desktop\EXPERIMENT\artifactory\release
29 verbose Windows_NT 10.0.16299
30 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
31 verbose node v10.16.3
32 verbose npm v6.9.0
33 error code E404
34 error 404 Not Found - GET https://[DOMAIN]:443/artifactory/api/npm/product_release_npm/#luciad/ria-core/-/#luciad/ria-core-2019.0.1.tgz
35 error 404
36 error 404 '#luciad/ria-core#^2019.0' is not in the npm registry.
37 error 404 You should bug the author to publish it (or use the name yourself!)
38 error 404 Note that you can also install from a
39 error 404 tarball, folder, http url, or git url.
40 verbose exit [ 1, true ]
Any idea what might be causing this and/or how to fix this issue?

npm died completely, ERR_TLS_CERT_ALTNAME_INVALID, Hostname/IP does not match certificate's altnames: Host: registry.npmjs.org

I'm running bash on windows (Ubuntu 18) and I recently switched to Yarn, but I needed to use npm again to install truffle and discovered my npm is dead. I tried reinstalling node/npm, even reinstalling Ubuntu itself, but kept getting this same error.
Below is the error log. I'm totally lost now...
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'install' ]
2 info using npm#5.6.0
3 info using node#v8.11.4
4 verbose npm-session 6f42a40556042ae5
5 silly install runPreinstallTopLevelLifecycles
6 silly preinstall inbox#1.0.0
7 info lifecycle inbox#1.0.0~preinstall: inbox#1.0.0
8 silly install loadCurrentTree
9 silly install readLocalPackageData
10 silly install loadIdealTree
11 silly install cloneCurrentTreeToIdealTree
12 silly install loadShrinkwrap
13 silly install loadAllDepsIntoIdealTree
14 silly fetchPackageMetaData error for truffle#^4.1.14 request to https://registry.npmjs.org/truffle failed, reason: Hostname/IP$15 silly fetchPackageMetaData error for truffle#^4.1.14 request to https://registry.npmjs.org/truffle failed, reason: Hostname/IP$16 silly saveTree inbox#1.0.0
17 verbose type system
18 verbose stack FetchError: request to https://registry.npmjs.org/truffle failed, reason: Hostname/IP doesn't match certificate'$18 verbose stack at ClientRequest.req.on.err (/usr/lib/node_modules/npm/node_modules/pacote/node_modules/make-fetch-happen/no$18 verbose stack at emitOne (events.js:116:13)
18 verbose stack at ClientRequest.emit (events.js:211:7)
18 verbose stack at TLSSocket.socketErrorListener (_http_client.js:387:9)
18 verbose stack at emitOne (events.js:116:13)
18 verbose stack at TLSSocket.emit (events.js:211:7)
18 verbose stack at emitErrorNT (internal/streams/destroy.js:64:8)
18 verbose stack at _combinedTickCallback (internal/process/next_tick.js:138:11)
18 verbose stack at process._tickCallback (internal/process/next_tick.js:180:9)
19 verbose cwd /mnt/c/Users/user06/Documents/bootcamp/capstone/truffle_test
20 verbose Linux 4.4.0-17134-Microsoft
21 verbose argv "/usr/bin/node" "/usr/bin/npm" "install"
22 verbose node v8.11.4
23 verbose npm v5.6.0
24 error request to https://registry.npmjs.org/truffle failed, reason: Hostname/IP doesn't match certificate's altnames: "Host: r$25 verbose exit [ 1, true ]
An earlier outage involving a DNS misconfiguration has lead to some ISPs caching npmjs.com as missing, a workaround for this is to use a third party DNS provider such as Cloudflare or Google, the affected caches should clear within the next 24 hours.
https://status.npmjs.org/incidents/v22ffls5cd6h

Apache Cordova installation ERROR

I tried to install Apache Cordova like they do it in the "get started" section of their website. First I install Node.js and npm, but as I tried to install the Cordova npm package I get the following error.
Here is the npm-debug.log file:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files (x86)\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli '-g',
1 verbose cli 'install',
1 verbose cli 'appcelerator',
1 verbose cli '--color',
1 verbose cli 'false' ]
2 info using npm#2.11.3
3 info using node#v0.12.7
4 verbose install initial load of C:\Users\hoerdtf\AppData\Roaming\npm\package.json
5 verbose readDependencies loading dependencies from C:\Users\hoerdtf\AppData\Roaming\npm\package.json
6 silly cache add args [ 'appcelerator', null ]
7 verbose cache add spec appcelerator
8 silly cache add parsed spec { raw: 'appcelerator',
8 silly cache add scope: null,
8 silly cache add name: 'appcelerator',
8 silly cache add rawSpec: '',
8 silly cache add spec: '*',
8 silly cache add type: 'range' }
9 silly addNamed appcelerator#*
10 verbose addNamed "*" is a valid semver range for appcelerator
11 silly addNameRange { name: 'appcelerator', range: '*', hasData: false }
12 silly mapToRegistry name appcelerator
13 silly mapToRegistry using default registry
14 silly mapToRegistry registry https://registry.npmjs.org/
15 silly mapToRegistry uri https://registry.npmjs.org/appcelerator
16 verbose addNameRange registry:https://registry.npmjs.org/appcelerator not in flight; fetching
17 verbose request uri https://registry.npmjs.org/appcelerator
18 verbose request no auth needed
19 info attempt registry request try #1 at 09:26:46
20 verbose request id c48a8e708e170ca1
21 http request GET https://registry.npmjs.org/appcelerator
22 info retry will retry, error on last attempt: Error: self signed certificate in certificate chain
23 info attempt registry request try #2 at 09:26:56
24 http request GET https://registry.npmjs.org/appcelerator
25 info retry will retry, error on last attempt: Error: self signed certificate in certificate chain
26 info attempt registry request try #3 at 09:27:56
27 http request GET https://registry.npmjs.org/appcelerator
28 verbose stack Error: self signed certificate in certificate chain
28 verbose stack at Error (native)
28 verbose stack at TLSSocket.<anonymous> (_tls_wrap.js:929:36)
28 verbose stack at TLSSocket.emit (events.js:104:17)
28 verbose stack at TLSSocket._finishInit (_tls_wrap.js:460:8)
29 verbose cwd D:\
30 error Windows_NT 6.1.7601
31 error argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "-g" "install" "appcelerator" "--color" "false"
32 error node v0.12.7
33 error npm v2.11.3
34 error code SELF_SIGNED_CERT_IN_CHAIN
35 error self signed certificate in certificate chain
36 error If you need help, you may report this error at:
36 error <https://github.com/npm/npm/issues>
37 verbose exit [ 1, true ]
Maybe anyone could help me?
Thank you!
According to follwoing npm’s Self-Signed Certificate is No More
You can disable certificate with following command: npm set strict-ssl false
https://coderwall.com/p/c2njkg/fix-npm-self_signed_cert_in_chain-or-cert_untrusted-errors
http://blog.npmjs.org/post/78085451721/npms-self-signed-certificate-is-no-more
It's already helped you i added answer so some one else facing issue can also resolve it.
Thank you.

assemble install error via npm

I wanted to install assemble.io but i get only this strange error messages.
I use node version 5.2.0, npm version 3.3.12, grunt 0.4.5. somebody has an idea what im doing wrong?
I install the plugin with this command:
npm install assemble --save-dev
This is the official docu for the installation
http://assemble.io/docs/Installation.html
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "assemble" "--save-dev"
npm ERR! node v5.2.0
npm ERR! npm v3.3.12
npm ERR! code ENOSELF
npm ERR! Refusing to install assemble as a dependency of itself
npm ERR!
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\<my user>\Desktop\assemble test\npm-debug.log
this is the npm-debug.log
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'install',
1 verbose cli 'assemble',
1 verbose cli '--save-dev' ]
2 info using npm#3.3.12
3 info using node#v5.2.0
4 silly loadCurrentTree Starting
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 silly fetchPackageMetaData assemble
8 silly fetchNamedPackageData assemble
9 silly mapToRegistry name assemble
10 silly mapToRegistry using default registry
11 silly mapToRegistry registry https://registry.npmjs.org/
12 silly mapToRegistry uri https://registry.npmjs.org/assemble
13 verbose request uri https://registry.npmjs.org/assemble
14 verbose request no auth needed
15 info attempt registry request try #1 at 11:07:31
16 verbose request id aa14641fec14dacb
17 verbose etag "8IAPJTPQFKJPLI2YBI4NXTZG4"
18 http request GET https://registry.npmjs.org/assemble
19 http 304 https://registry.npmjs.org/assemble
20 verbose headers { date: 'Tue, 12 Jan 2016 10:07:31 GMT',
20 verbose headers via: '1.1 varnish',
20 verbose headers 'cache-control': 'max-age=300',
20 verbose headers etag: '"8IAPJTPQFKJPLI2YBI4NXTZG4"',
20 verbose headers age: '62',
20 verbose headers connection: 'keep-alive',
20 verbose headers 'x-served-by': 'cache-ams4139-AMS',
20 verbose headers 'x-cache': 'HIT',
20 verbose headers 'x-cache-hits': '1',
20 verbose headers 'x-timer': 'S1452593251.405495,VS0,VE1',
20 verbose headers vary: 'Accept' }
21 silly get cb [ 304,
21 silly get { date: 'Tue, 12 Jan 2016 10:07:31 GMT',
21 silly get via: '1.1 varnish',
21 silly get 'cache-control': 'max-age=300',
21 silly get etag: '"8IAPJTPQFKJPLI2YBI4NXTZG4"',
21 silly get age: '62',
21 silly get connection: 'keep-alive',
21 silly get 'x-served-by': 'cache-ams4139-AMS',
21 silly get 'x-cache': 'HIT',
21 silly get 'x-cache-hits': '1',
21 silly get 'x-timer': 'S1452593251.405495,VS0,VE1',
21 silly get vary: 'Accept' } ]
22 verbose etag https://registry.npmjs.org/assemble from cache
23 verbose get saving assemble to C:\Users\<my user>\AppData\Roaming\npm-cache\registry.npmjs.org\assemble\.cache.json
24 silly install normalizeTree
25 silly loadCurrentTree Finishing
26 silly loadIdealTree Starting
27 silly install loadIdealTree
28 silly cloneCurrentTree Starting
29 silly install cloneCurrentTreeToIdealTree
30 silly cloneCurrentTree Finishing
31 silly loadShrinkwrap Starting
32 silly install loadShrinkwrap
33 silly loadShrinkwrap Finishing
34 silly loadAllDepsIntoIdealTree Starting
35 silly install loadAllDepsIntoIdealTree
36 silly rollbackFailedOptional Starting
37 silly rollbackFailedOptional Finishing
38 silly runTopLevelLifecycles Starting
39 silly runTopLevelLifecycles Finishing
40 silly install printInstalled
41 verbose stack Error: Refusing to install assemble as a dependency of itself
41 verbose stack at checkSelf (C:\Program Files\nodejs\node_modules\npm\lib\install\validate-args.js:40:14)
41 verbose stack at Array.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\slide\lib\bind-actor.js:15:8)
41 verbose stack at LOOP (C:\Program Files\nodejs\node_modules\npm\node_modules\slide\lib\chain.js:15:14)
41 verbose stack at chain (C:\Program Files\nodejs\node_modules\npm\node_modules\slide\lib\chain.js:20:5)
41 verbose stack at C:\Program Files\nodejs\node_modules\npm\lib\install\validate-args.js:15:5
41 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\slide\lib\async-map.js:52:35
41 verbose stack at Array.forEach (native)
41 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\slide\lib\async-map.js:52:11
41 verbose stack at Array.forEach (native)
41 verbose stack at asyncMap (C:\Program Files\nodejs\node_modules\npm\node_modules\slide\lib\async-map.js:51:8)
42 verbose cwd C:\Users\<my user>\Desktop\assemble test
43 error Windows_NT 6.3.9600
44 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "assemble" "--save-dev"
45 error node v5.2.0
46 error npm v3.3.12
47 error code ENOSELF
48 error Refusing to install assemble as a dependency of itself
49 error If you need help, you may report this error at:
49 error <https://github.com/npm/npm/issues>
50 verbose exit [ 1, true ]
gregor ;)
Ok i found the problem. The official documentation is out of date. i found the answer there
Major refactor. Assemble was completely re-written from the ground-up as a standalone node.js library and is no longer a grunt plugin. Grunt plugin support has been moved to grunt-assemble. Please see that repo for additional details.
so you have to use
npm install grunt-assemble --save-dev
now, if you like to use assemble with grunt

Error installing karma on Windows 7

I'm trying to install karma using
npm install -g karma
but, even as the admin, I'm getting these errors:
0 info it worked if it ends with ok
1 verbose cli [ 'Z:\\Users\\vazirin\\Downloads\\Node\\\\node.exe',
1 verbose cli 'Z:\\Users\\vazirin\\Downloads\\Node\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'install',
1 verbose cli '-g',
1 verbose cli 'karma' ]
2 info using npm#1.3.3
3 info using node#v0.10.11
4 verbose node symlink Z:\Users\vazirin\Downloads\Node\\node.exe
5 verbose cache add [ 'karma', null ]
6 verbose cache add name=undefined spec="karma" args=["karma",null]
7 verbose parsed url { protocol: null,
7 verbose parsed url slashes: null,
7 verbose parsed url auth: null,
7 verbose parsed url host: null,
7 verbose parsed url port: null,
7 verbose parsed url hostname: null,
7 verbose parsed url hash: null,
7 verbose parsed url search: null,
7 verbose parsed url query: null,
7 verbose parsed url pathname: 'karma',
7 verbose parsed url path: 'karma',
7 verbose parsed url href: 'karma' }
8 silly lockFile 512423cb-karma karma
9 verbose lock karma Z:\Users\vazirin\AppData\Roaming\npm-cache\512423cb-karma.lock
10 silly lockFile 512423cb-karma karma
11 silly lockFile 512423cb-karma karma
12 verbose addNamed [ 'karma', '' ]
13 verbose addNamed [ null, '*' ]
14 silly lockFile cd7961bb-karma karma#
15 verbose lock karma# Z:\Users\vazirin\AppData\Roaming\npm-cache\cd7961bb-karma.lock
16 silly addNameRange { name: 'karma', range: '*', hasData: false }
17 verbose url raw karma
18 verbose url resolving [ 'https://registry.npmjs.org/', './karma' ]
19 verbose url resolved https://registry.npmjs.org/karma
20 info trying registry request attempt 1 at 12:57:46
21 http GET https://registry.npmjs.org/karma
22 info retry will retry, error on last attempt: Error: tunneling socket could not be established, cause=getaddrinfo ENOTFOUND
23 info trying registry request attempt 2 at 12:57:58
24 http GET https://registry.npmjs.org/karma
25 info retry will retry, error on last attempt: Error: tunneling socket could not be established, cause=getaddrinfo ENOTFOUND
26 info trying registry request attempt 3 at 12:59:00
27 http GET https://registry.npmjs.org/karma
28 silly lockFile cd7961bb-karma karma#
29 silly lockFile cd7961bb-karma karma#
30 error Error: tunneling socket could not be established, cause=getaddrinfo ENOTFOUND
30 error at ClientRequest.onError (Z:\Users\vazirin\Downloads\Node\node_modules\npm\node_modules\request\node_modules\tunnel-agent\index.js:159:17)
30 error at ClientRequest.g (events.js:175:14)
30 error at ClientRequest.EventEmitter.emit (events.js:95:17)
30 error at Socket.socketErrorListener (http.js:1517:9)
30 error at Socket.EventEmitter.emit (events.js:95:17)
30 error at net.js:829:16
30 error at process._tickCallback (node.js:415:13)
31 error If you need help, you may report this log at:
31 error <http://github.com/isaacs/npm/issues>
31 error or email it to:
31 error <npm-#googlegroups.com>
32 error System Windows_NT 6.1.7601
33 error command "Z:\\Users\\vazirin\\Downloads\\Node\\\\node.exe" "Z:\\Users\\vazirin\\Downloads\\Node\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "karma"
34 error cwd Z:\Users\vazirin
35 error node -v v0.10.11
36 error npm -v 1.3.3
37 error code ECONNRESET
38 verbose exit [ 1, true ]
Anyone have any ideas why this is happening? I have no problem running this on OS X Mountain Lion.
I ended up uninstalling node. Then used chocolatey to install it. That gave me a couple of errors but as I debugged, it turned out that for some reason, the npm config file had the wrong registry address to look up the packages. So when I executed
npm install -g karma
it would try to connect to the registry and couldn't. After fixing the address, everything worked smoothly. I was starting to question if my previously installed programs had changed any system config files or network settings. Evidently, there was no proxy issue encountered.

Resources