I'm having a huge issue with npm not being able to install anything on a virtual machine in a data centre because I keep getting ECONNRESET fails.
I've tried the set registry from http to https and back again with no change and I can't even upgrade npm without it failing.
I've been at this for a day now and am getting no where, hence the request.
I'm ultimately trying to install a meteor app with mup if that makes any difference.
The output from the last attempt is
taralga-infolite% npm install npm#latest -g
npm ERR! network read ECONNRESET
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! System Linux 3.13.0-74-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "npm#latest" "-g"
npm ERR! cwd /home/pnunn
npm ERR! node -v v0.10.36
npm ERR! npm -v 1.4.28
npm ERR! syscall read
npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/pnunn/npm-debug.log
npm ERR! not ok code 0
The log file is
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'install', 'npm#latest', '-g' ]
2 info using npm#1.4.28
3 info using node#v0.10.36
4 verbose node symlink /usr/bin/node
5 verbose cache add [ 'npm#latest', null ]
6 verbose cache add name=undefined spec="npm#latest" args=["npm#latest",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: 'npm#latest',
7 verbose parsed url path: 'npm#latest',
7 verbose parsed url href: 'npm#latest' }
8 verbose cache add name="npm" spec="latest" args=["npm","latest"]
9 verbose parsed url { protocol: null,
9 verbose parsed url slashes: null,
9 verbose parsed url auth: null,
9 verbose parsed url host: null,
9 verbose parsed url port: null,
9 verbose parsed url hostname: null,
9 verbose parsed url hash: null,
9 verbose parsed url search: null,
9 verbose parsed url query: null,
9 verbose parsed url pathname: 'latest',
9 verbose parsed url path: 'latest',
9 verbose parsed url href: 'latest' }
10 verbose addNamed [ 'npm', 'latest' ]
11 verbose addNamed [ null, null ]
12 silly lockFile 588f5fcc-npm-latest npm#latest
13 verbose lock npm#latest /home/pnunn/.npm/588f5fcc-npm-latest.lock
14 info addNameTag [ 'npm', 'latest' ]
15 verbose request where is /npm
16 verbose request registry http://registry.npmjs.org/
17 verbose request id 08cd751c52e5f075
18 verbose url raw /npm
19 verbose url resolving [ 'http://registry.npmjs.org/', './npm' ]
20 verbose url resolved http://registry.npmjs.org/npm
21 verbose request where is http://registry.npmjs.org/npm
22 info trying registry request attempt 1 at 13:51:28
23 http GET http://registry.npmjs.org/npm
24 info retry will retry, error on last attempt: Error: read ECONNRESET
25 info trying registry request attempt 2 at 13:51:38
26 http GET http://registry.npmjs.org/npm
27 info retry will retry, error on last attempt: Error: read ECONNRESET
28 info trying registry request attempt 3 at 13:52:38
29 http GET http://registry.npmjs.org/npm
30 silly lockFile 588f5fcc-npm-latest npm#latest
31 silly lockFile 588f5fcc-npm-latest npm#latest
32 error network read ECONNRESET
32 error network This is most likely not a problem with npm itself
32 error network and is related to network connectivity.
32 error network In most cases you are behind a proxy or have bad network settings.
32 error network
32 error network If you are behind a proxy, please make sure that the
32 error network 'proxy' config is set properly. See: 'npm help config'
33 error System Linux 3.13.0-74-generic
34 error command "/usr/bin/node" "/usr/bin/npm" "install" "npm#latest" "-g"
35 error cwd /home/pnunn
36 error node -v v0.10.36
37 error npm -v 1.4.28
38 error syscall read
39 error code ECONNRESET
40 error errno ECONNRESET
41 verbose exit [ 1, true ]
I get basically the same thing if I try and npm install underscore or npm install server (which are the two current packages the mup install is failing on).
I've run a tracert (actually mtr) to registry.npmjs.org and am getting no packet loss at all.
Any suggestions on what else to try?
Ta
Peter.
Finally figured out a way to make this work.
Turns out the answer is two fold... firstly, update npm to the latest version. To do this on my system I had to do
sudo mv /usr/bin/npm /usr/bin/npm.old
sudo /usr/bin/npm.old install npm -g
Then change the registry to use the mirror and do this globally (it took me ages to work out I missed the -g flag in the configuration)
sudo npm config set registry https://skimdb.npmjs.com/registry -g
I also increased the number of retries to 10
sudo npm config set fetch-retries 10 -g
My /etc/npmrc file is now
registry=https://skimdb.npmjs.com/registry
fetch-retries=10
which is actually the easier way to set these on a linux system.
mup takes a while to deploy the sites, but at least it now works reliably. There is definitely a problem with the default npm registry. I used wget to download a number of the .tgz packages npm was having problems with and it would take up to 10 attempts to get a connection that was not immediately reset by the server. The mirror seems to be much more stable.
Related
I was looking for solutions to this problem in google.com, I read all related issues on this topic at stackoverflow.com. But the right answer is not found.
The problem is that for every command npm install -g (npm or yo or bower) go here such error:
C:\Users\User>npm install -g yo
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "yo"
npm ERR! node v4.2.1
npm ERR! npm v2.14.7
npm ERR! Invalid protocol: 192.168.10.1:
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:\Users\User\npm-debug.log
Installed operating system: Windows 7 (x86) Corporate.
Installed version Node.JS: 4.2.1 .
The content npm-debug.log file:
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 '-g',
1 verbose cli 'yo' ]
2 info using npm#2.14.7
3 info using node#v4.2.1
4 verbose install initial load of C:\Users\User\AppData\Roaming\npm\package.json
5 verbose readDependencies loading dependencies from C:\Users\User\AppData\Roaming\npm\package.json
6 silly cache add args [ 'yo', null ]
7 verbose cache add spec yo
8 silly cache add parsed spec Result {
8 silly cache add raw: 'yo',
8 silly cache add scope: null,
8 silly cache add name: 'yo',
8 silly cache add rawSpec: '',
8 silly cache add spec: '*',
8 silly cache add type: 'range' }
9 silly addNamed yo#*
10 verbose addNamed "*" is a valid semver range for yo
11 silly addNameRange { name: 'yo', range: '*', hasData: false }
12 silly mapToRegistry name yo
13 silly mapToRegistry using default registry
14 silly mapToRegistry registry http://registry.npmjs.org/
15 silly mapToRegistry uri http://registry.npmjs.org/yo
16 verbose addNameRange registry:http://registry.npmjs.org/yo not in flight; fetching
17 verbose request uri http://registry.npmjs.org/yo
18 verbose request no auth needed
19 info attempt registry request try #1 at 16:59:12
20 verbose request id 4545121454874541214
21 http request GET http://registry.npmjs.org/yo
22 info retry will retry, error on last attempt: Error: Invalid protocol: 192.168.10.1:
23 info attempt registry request try #2 at 16:59:22
24 http request GET http://registry.npmjs.org/yo
25 info retry will retry, error on last attempt: Error: Invalid protocol: 192.168.10.1:
26 info attempt registry request try #3 at 17:00:22
27 http request GET http://registry.npmjs.org/yo
28 verbose stack Error: Invalid protocol: 192.168.10.1:
28 verbose stack at Request.init (C:\Program Files\nodejs\node_modules\npm\node_modules\request\request.js:461:31)
28 verbose stack at new Request (C:\Program Files\nodejs\node_modules\npm\node_modules\request\request.js:140:8)
28 verbose stack at request (C:\Program Files\nodejs\node_modules\npm\node_modules\request\index.js:55:10)
28 verbose stack at CachingRegistryClient.makeRequest (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-client\lib\request.js:149:13)
28 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-client\lib\request.js:66:17
28 verbose stack at RetryOperation._fn (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-client\lib\attempt.js:18:5)
28 verbose stack at null._onTimeout (C:\Program Files\nodejs\node_modules\npm\node_modules\retry\lib\retry_operation.js:49:10)
28 verbose stack at Timer.listOnTimeout (timers.js:92:15)
29 verbose cwd C:\Users\User
30 error Windows_NT 6.1.7601
31 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "yo"
32 error node v4.2.1
33 error npm v2.14.7
34 error Invalid protocol: 192.168.10.1:
35 error If you need help, you may report this error at:
35 error <https://github.com/npm/npm/issues>
36 verbose exit [ 1, true ]
Why leave such a mistake? What's the problem here? How to solve this problem? Thank you in advance for help
My computer connects Internet through a proxy server. By this, I changed the configuration npm on:
npm config set http-proxy http://192.168.10.1:3128
npm config set https-proxy https://192.168.10.1:3128
npm config set registry http://registry.npmjs.org/
npm config set strict-ssl=false
here is my solution
npm config set http-proxy http://192.168.10.1
I had the same problem while installing native scripts. Try using the following commands:
set http
set http_proxy=
This will help you.
I'm trying to republish a package using npm. I did update the package version in package.json, yet I get the following error:
npm ERR! publish Failed PUT 404
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" "publish"
npm ERR! node v0.12.3
npm ERR! npm v2.9.1
npm ERR! code E404
npm ERR! 404 missing : #psychodelicgod/npm
npm ERR! 404
npm ERR! 404 '#psychodelicgod/npm' 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! C:\Users\Michał Szydłowski\npm\npm-debug.log
and my 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 'publish' ]
2 info using npm#2.9.1
3 info using node#v0.12.3
4 verbose node symlink C:\Program Files\nodejs\\node.exe
5 verbose publish [ '.' ]
6 silly cache add args [ '.', null ]
7 verbose cache add spec .
8 silly cache add parsed spec { raw: '.',
8 silly cache add scope: null,
8 silly cache add name: null,
8 silly cache add rawSpec: '.',
8 silly cache add spec: 'C:\\Users\\Michał Szydłowski\\npm',
8 silly cache add type: 'directory' }
9 verbose addLocalDirectory C:\Users\Michał Szydłowski\AppData\Roaming\npm-cache\#psychodelicgod\npm\1.0.2\package.tgz not in flight; packing
10 verbose tar pack [ 'C:\\Users\\Michał Szydłowski\\AppData\\Roaming\\npm-cache\\#psychodelicgod\\npm\\1.0.2\\package.tgz',
10 verbose tar pack 'C:\\Users\\Michał Szydłowski\\npm' ]
11 verbose tarball C:\Users\Michał Szydłowski\AppData\Roaming\npm-cache\#psychodelicgod\npm\1.0.2\package.tgz
12 verbose folder C:\Users\Michał Szydłowski\npm
13 info prepublish #psychodelicgod/npm#1.0.2
14 verbose addLocalTarball adding from inside cache C:\Users\Michał Szydłowski\AppData\Roaming\npm-cache\#psychodelicgod\npm\1.0.2\package.tgz
15 silly cache afterAdd #psychodelicgod/npm#1.0.2
16 verbose afterAdd C:\Users\Michał Szydłowski\AppData\Roaming\npm-cache\#psychodelicgod\npm\1.0.2\package\package.json not in flight; writing
17 verbose afterAdd C:\Users\Michał Szydłowski\AppData\Roaming\npm-cache\#psychodelicgod\npm\1.0.2\package\package.json written
18 silly publish { name: '#psychodelicgod/npm',
18 silly publish version: '1.0.2',
18 silly publish description: 'd',
18 silly publish main: 'index.js',
18 silly publish scripts: { test: 'node test.js' },
18 silly publish author: '',
18 silly publish license: 'ISC',
18 silly publish dependencies: { '#linclark/pkg': '^1.0.2' },
18 silly publish repository: { type: 'git', url: 'C:\\Users\\Michał Szydłowski\\npm' },
18 silly publish readme: 'Sample description.',
18 silly publish readmeFilename: 'README.md',
18 silly publish _id: '#psychodelicgod/npm#1.0.2',
18 silly publish _shasum: 'b66a8a42e64f0a2b8166ce511629e107d47ab027',
18 silly publish _from: '.' }
19 verbose getPublishConfig undefined
20 silly mapToRegistry name #psychodelicgod/npm
21 silly mapToRegistry scope (from package name) #psychodelicgod
22 verbose mapToRegistry no registry URL found in name for scope #psychodelicgod
23 silly mapToRegistry using default registry
24 silly mapToRegistry registry http://localhost:15443/
25 silly mapToRegistry uri http://localhost:15443/#psychodelicgod%2fnpm
26 verbose publish registryBase http://localhost:15443/
27 silly publish uploading C:\Users\Michał Szydłowski\AppData\Roaming\npm-cache\#psychodelicgod\npm\1.0.2\package.tgz
28 verbose request uri http://localhost:15443/#psychodelicgod%2fnpm
29 verbose request sending authorization for write operation
30 info attempt registry request try #1 at 13:11:50
31 verbose request id e5c460330af2176f
32 http request PUT http://localhost:15443/#psychodelicgod%2fnpm
33 http 404 http://localhost:15443/#psychodelicgod%2fnpm
34 verbose headers { 'content-type': 'application/json',
34 verbose headers date: 'Fri, 03 Jul 2015 11:11:50 GMT',
34 verbose headers connection: 'keep-alive',
34 verbose headers 'transfer-encoding': 'chunked' }
35 verbose request invalidating C:\Users\Michał Szydłowski\AppData\Roaming\npm-cache\localhost_15443\_40psychodelicgod_252fnpm on PUT
36 error publish Failed PUT 404
37 verbose stack Error: missing : #psychodelicgod/npm
37 verbose stack at CachingRegistryClient.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-client\lib\request.js:247:14)
37 verbose stack at Request._callback (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-client\lib\request.js:170:14)
37 verbose stack at Request.self.callback (C:\Program Files\nodejs\node_modules\npm\node_modules\request\request.js:368:22)
37 verbose stack at Request.emit (events.js:110:17)
37 verbose stack at Request.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\request\request.js:1219:14)
37 verbose stack at Request.emit (events.js:129:20)
37 verbose stack at IncomingMessage.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\request\request.js:1167:12)
37 verbose stack at IncomingMessage.emit (events.js:129:20)
37 verbose stack at _stream_readable.js:908:16
37 verbose stack at process._tickCallback (node.js:355:11)
38 verbose statusCode 404
39 verbose pkgid #psychodelicgod/npm
40 verbose cwd C:\Users\Michał Szydłowski\npm
41 error Windows_NT 6.3.9600
42 error argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "publish"
43 error node v0.12.3
44 error npm v2.9.1
45 error code E404
46 error 404 missing : #psychodelicgod/npm
46 error 404
46 error 404 '#psychodelicgod/npm' is not in the npm registry.
46 error 404 You should bug the author to publish it (or use the name yourself!)
46 error 404
46 error 404 Note that you can also install from a
46 error 404 tarball, folder, http url, or git url.
47 verbose exit [ 1, true ]
I've tried several similar answers here, but none of this is helping. Any ideas?
#To publish on npm registry
You need to create npm user. You can follow here.
In short
npm adduser
npm login
Do npm config ls to ensure that credentials are stored on your client.
Then try
npm publish.
To install it locally OR test packaging your module
You can try
tar -tf $(npm pack)
npm install <path/to/your/package.tgz>
I checked here and here for references.
I also had the same problem.
for me the email was not verified.
You can login on npmjs.org and verify the email.
I don't know, What happen in your code during installation package. Please check here : https://docs.npmjs.com/getting-started/creating-node-modules to take a look how to install package modules.
These are simple way to install package :
Publish your package to npm
Make a new directory outside of your project and cd into it
Run npm install <package>
Create a test.js file which requires the package and calls the method
Run node test.js. The message should be output.
From log, I have noticed following exception
36 error publish Failed PUT 404
37 verbose stack Error: missing : #psychodelicgod/npm
Either you seems to be logged out or You need to have registered npm adduser "psychodelicgod" as a username at the registry and be logged in to publish under that scope. Please have a look at "Working with scoped packages" and "publishing NPM Packages"
404 errors when publishing is mainly due to access errors. It could be an access token error or a read-write error. Please check your access settings on the organization package permissions page.
If you are publishing for the first time from your local machine, use npm login to create an access token on your account. Once logged in, the token will be automatically added to your global npmrc file and you can try publishing again.
If you are trying to update a package and seeing the 404 error, please enable read-write permission on your organization settings for the package.
If you are using a CI/CD pipeline tool, specifying the scope is mandatory and use the access token that has read-write permission.
There is (as of writing) a bug in npmjs.org's implementation of the npm server which does not provide useful information when a package fails to publish. If you're using npmjs.org within the scope of an organization, ensure that your user's permissions are read-write. This seems obvious, of course, but the error presented would indicate that the repository for which an update is being attempted is either non-existent, or at least invisible to the user attempting the publish. In fact, the user may be able to see the package when searching, but be told the package does not exist when attempting to publish.
Perhaps there is a similar issue with your npm server.
I've a problem with the installation for yeoman, bower, grunt and the latest npm version.
The latest version of NodeJS (0.12.2) is installed on my pc.
I have the npm version 2.7.4 but when I start the git bash in the nodejs folder and type "npm install npm" or "npm install npm#latest" then it gives an error message:
error Windows_NT 6.1.7601
error argv "c:\\Program Files\\nodejs\\node.exe" "c:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "npm#latest"
error node v0.12.2
error npm v2.7.4
error code ETIMEDOUT
error errno ETIMEDOUT
error syscall connect
error network connect ETIMEDOUT
error network This is most likely not a problem with npm itself
error network and is related to network connectivity.
error network In most cases you are behind a proxy or have bad network settings.
error network
error network If you are behind a proxy, please make sure that the
error network 'proxy' config is set properly. See: 'npm help config'
verbose exit [ 1, true ]
And the complete 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 'npm#latest' ]
2 info using npm#2.7.4
3 info using node#v0.12.2
4 warn package.json nodejs#0.12.2 No description
5 warn package.json nodejs#0.12.2 No repository field.
6 warn package.json nodejs#0.12.2 No README data
7 silly cache add args [ 'npm#latest', null ]
8 verbose cache add spec npm#latest
9 silly cache add parsed spec { raw: 'npm#latest',
9 silly cache add scope: null,
9 silly cache add name: 'npm',
9 silly cache add rawSpec: 'latest',
9 silly cache add spec: 'latest',
9 silly cache add type: 'tag' }
10 verbose addNamed npm#latest
11 silly addNamed semver.valid null
12 silly addNamed semver.validRange null
13 info addNameTag [ 'npm', 'latest' ]
14 silly mapToRegistry name npm
15 silly mapToRegistry using default registry
16 silly mapToRegistry registry https://registry.npmjs.org/
17 silly mapToRegistry uri https://registry.npmjs.org/npm
18 verbose addNameTag registry:https://registry.npmjs.org/npm not in flight; fetching
19 verbose request uri https://registry.npmjs.org/npm
20 verbose request no auth needed
21 info attempt registry request try #1 at 09:30:04
22 verbose request id 6fa6dc64e92e52cc
23 http request GET https://registry.npmjs.org/npm
24 info retry will retry, error on last attempt: Error: connect ETIMEDOUT
25 info attempt registry request try #2 at 09:30:35
26 http request GET https://registry.npmjs.org/npm
27 info retry will retry, error on last attempt: Error: connect ETIMEDOUT
28 info attempt registry request try #3 at 09:31:56
29 http request GET https://registry.npmjs.org/npm
30 verbose stack Error: connect ETIMEDOUT
30 verbose stack at exports._errnoException (util.js:746:11)
30 verbose stack at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1000:19)
31 verbose cwd c:\Program Files\nodejs
I've read some threads with problems of nodejs and found an ability to set the http proxy. Is that the solution?
I've solved my problem. To find out my proxy-server name on windows 7 I've opened command line of windows and type: netsh winhttp show proxy
Then I added these lines in the .npmrc data (path:C:\users\username)
registry=http://registry.npmjs.org/
strict-ssl=false
proxy=http://username:password#proxy.domain.com:8080/
https-proxy=http://username:password#proxy.domain.com:8080
It works fine :)
Background_Note:
I have installed protractor successfully in all global/host machines. But the same does't work in VMs.
That is, this issue appears only in a Windows 7 Virtual machine, not otherwise.
All these machines (VM, hosts and individual machines) have the same Proxy settings, and I have set the same in npm config everywhere.
npm config set proxy http://proxy_server:8080
npm config set https-proxy http://proxy_server:8080
Now the procedure I tried:
I am in a windows 7 remote desktop (VM), logged in as a non administrator user
I opened cmd window as administrator.
Tried installing protractor as
npm install -g protractor
This installation fails, log and config lists are attached below.
Tried all the possible answers from Bower error tunneling socket could not be established, cause=Parse Error
==> They don't work for me.
C:\Windows\system32>npm config list
; cli configs
registry = "http://registry.npmjs.org/"
user-agent = "npm/1.4.28 node/v0.10.33 win32 x64"
; userconfig C:\Users\test\.npmrc
registry = "http://registry.npmjs.org/"
; builtin config undefined
prefix = "C:\\Users\\test\\AppData\\Roaming\\npm"
; node bin location = C:\Program Files\nodejs\\node.exe
; cwd = C:\Windows\system32
; HOME = C:\Users\test
; 'npm config ls -l' to show all defaults.
C:\Windows\system32>
Log written at 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 '-g',
1 verbose cli 'protractor',
1 verbose cli '--registry',
1 verbose cli 'http://registry.npmjs.org/' ]
2 info using npm#1.4.28
3 info using node#v0.10.33
4 verbose node symlink C:\Program Files\nodejs\\node.exe
5 verbose cache add [ 'protractor', null ]
6 verbose cache add name=undefined spec="protractor" args=["protractor",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: 'protractor',
7 verbose parsed url path: 'protractor',
7 verbose parsed url href: 'protractor' }
8 silly lockFile 4f4f4858-protractor protractor
9 verbose lock protractor C:\Users\test\AppData\Roaming\npm-cache\4f4f4858-protractor.lock
10 silly lockFile 4f4f4858-protractor protractor
11 silly lockFile 4f4f4858-protractor protractor
12 verbose addNamed [ 'protractor', '' ]
13 verbose addNamed [ null, '*' ]
14 silly lockFile 80d5ca5a-protractor protractor#
15 verbose lock protractor# C:\Users\test\AppData\Roaming\npm-cache\80d5ca5a-protractor.lock
16 silly addNameRange { name: 'protractor', range: '*', hasData: false }
17 verbose request where is /protractor
18 verbose request registry http://registry.npmjs.org/
19 verbose request id b468ffda57abdf0d
20 verbose url raw /protractor
21 verbose url resolving [ 'http://registry.npmjs.org/', './protractor' ]
22 verbose url resolved http://registry.npmjs.org/protractor
23 verbose request where is http://registry.npmjs.org/protractor
24 info trying registry request attempt 1 at 18:20:15
25 http GET http://registry.npmjs.org/protractor
26 info retry will retry, error on last attempt: Error: connect ETIMEDOUT
27 info trying registry request attempt 2 at 18:20:47
28 http GET http://registry.npmjs.org/protractor
29 info retry will retry, error on last attempt: Error: connect ETIMEDOUT
30 info trying registry request attempt 3 at 18:22:08
31 http GET http://registry.npmjs.org/protractor
32 silly lockFile 80d5ca5a-protractor protractor#
33 silly lockFile 80d5ca5a-protractor protractor#
34 error network connect ETIMEDOUT
34 error network This is most likely not a problem with npm itself
34 error network and is related to network connectivity.
34 error network In most cases you are behind a proxy or have bad network settings.
34 error network
34 error network If you are behind a proxy, please make sure that the
34 error network 'proxy' config is set properly. See: 'npm help config'
35 error System Windows_NT 6.1.7600
36 error command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "protractor" "--registry" "http://registry.npmjs.org/"
37 error cwd C:\Windows\system32
38 error node -v v0.10.33
39 error npm -v 1.4.28
40 error syscall connect
41 error code ETIMEDOUT
42 error errno ETIMEDOUT
43 verbose exit [ 1, true ]
Solved.
When a VM is used and it has certain set of proxies, use the global proxy (which is the root for all others).
So, run these two commands before installing protractor:
C:\Windows\system32>npm config set registry "http://registry.npmjs.org/"
C:\Windows\system32>npm config set proxy http://global.proxy.alcatel-lucent.com:8000
Solves the issue
I have created a local NPM pacakge, i am trying to install the local package using fallowing command "npm install ../replacevalue/replacevalue-0.1.1tgz".
This is giveing me fallowing error.
My agenda is to "Locally test my npm modules without publishing them to npmjs.org".
0 info it worked if it ends with ok
1 verbose cli [ 'D:\\Program Files\\nodejs\\\\node.exe',
1 verbose cli 'D:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'install',
1 verbose cli '../replacevalue/replacevalue-0.1.1tgz' ]
2 info using npm#1.3.14
3 info using node#v0.10.22
4 verbose node symlink D:\Program Files\nodejs\\node.exe
5 verbose readDependencies using package.json deps
6 verbose cache add [ '../replacevalue/replacevalue-0.1.1tgz', null ]
7 verbose cache add name=undefined spec="../replacevalue/replacevalue-0.1.1tgz" args=["../replacevalue/replacevalue-0.1.1tgz",null]
8 verbose parsed url { protocol: null,
8 verbose parsed url slashes: null,
8 verbose parsed url auth: null,
8 verbose parsed url host: null,
8 verbose parsed url port: null,
8 verbose parsed url hostname: null,
8 verbose parsed url hash: null,
8 verbose parsed url search: null,
8 verbose parsed url query: null,
8 verbose parsed url pathname: '../replacevalue/replacevalue-0.1.1tgz',
8 verbose parsed url path: '../replacevalue/replacevalue-0.1.1tgz',
8 verbose parsed url href: '../replacevalue/replacevalue-0.1.1tgz' }
9 silly lockFile 11fd2abd-placevalue-replacevalue-0-1-1tgz ../replacevalue/replacevalue-0.1.1tgz
10 verbose lock ../replacevalue/replacevalue-0.1.1tgz C:\Users\mgowd1\AppData\Roaming\npm-cache\11fd2abd-placevalue-replacevalue-0-1-1tgz.lock
11 silly lockFile 11fd2abd-placevalue-replacevalue-0-1-1tgz ../replacevalue/replacevalue-0.1.1tgz
12 silly lockFile 11fd2abd-placevalue-replacevalue-0-1-1tgz ../replacevalue/replacevalue-0.1.1tgz
13 error addLocal Could not install ../replacevalue/replacevalue-0.1.1tgz
14 error Error: ENOENT, stat 'C:\node\replacevalue\replacevalue-0.1.1tgz'
15 error If you need help, you may report this log at:
15 error <http://github.com/isaacs/npm/issues>
15 error or email it to:
15 error <npm-#googlegroups.com>
16 error System Windows_NT 6.1.7601
17 error command "D:\\Program Files\\nodejs\\\\node.exe" "D:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "../replacevalue/replacevalue-0.1.1tgz"
18 error cwd C:\node\Node_Odin
19 error node -v v0.10.22
20 error npm -v 1.3.14
21 error path C:\node\replacevalue\replacevalue-0.1.1tgz
22 error code ENOENT
23 error errno 34
24 verbose exit [ 34, true ]
You want to be using npm link.
npm link allows you to 'install' a directory on your filesystem as if it were a package. It creates a symbolic link, meaning that you only have to run it once for the package to always stay 'up to date'.
To use it, navigate into the project you'd like to use your new package in, and run npm link /some/directory/path/to/your/package.
For testing you can just run "npm install " from your main package folder. It will install your local package as dependency to the node_modules folder. Then you can run "npm install" to install other dependecies.
If your still looking for an answer, these are the steps I took to get it working using help from a few answers:
cd my-package
npm run build
cp package.json dist/package.json
cd dist
npm link
cd my-project
npm link my-package-name
// Once you check your node_modules you should now see the correct dist files
If you made any mistakes allong the way, or already tried link
you can remove by:
cd my-project
npm unlink my-package-name