reedog117 / node-vsphere-soap

Node.js module for accessing VMware vCenter/ESXi hosts using SOAP
MIT License
32 stars 15 forks source link

Update package.json to point to modern version of soap library #7

Open JavaScriptDude opened 9 years ago

JavaScriptDude commented 9 years ago

When I installed node-vsphere-soap today, it installed soap version 0.6.1 even though the latest version is 0.9.3. I have no idea why npm did not pick up a later version but it did not. soap 0.6.1 is not usable in modern node (v0.12+) due to a fixed bug.

Is it possible to point your package.json to a higher version so this issue is prevented?

JavaScriptDude commented 9 years ago

Also, when using npm, it installs v0.0.2 instead of v0.0.2-5 as is in Github? Is NPM fully updated? Maybe this is the root cause.

reedog117 commented 9 years ago

I can't update soap to 0.9.x since it introduces a bug that breaks node-vsphere-soap. If you could find a soap version between the two that works in v0.12+, but doesn't break the module, that would be greatly appreciated.

Alternatively, you can try to get the soap devs to fix their code so that it passes the test I added via pull request. See vpulim/node-soap#670 and vpulim/node-soap#668

JavaScriptDude commented 9 years ago

I saw your node-soap bugs last night. Any chance that you can push your current code that uses node-soap 0.8.x to NPM? It seems to work ok for me.

reedog117 commented 9 years ago

That's weird -- when I do an npm info node-vsphere-soap it looks like it's already there...

pc-macbook:~ pat$ npm info node-vsphere-soap

{ name: 'node-vsphere-soap',
  description: 'interface to vSphere SOAP/WSDL from node for interfacing with vCenter or ESXi',
  'dist-tags': { latest: '0.0.2-5' },
  versions:
   [ '0.0.1-1',
     '0.0.1',
     '0.0.2-1',
     '0.0.2-2',
     '0.0.2-3',
     '0.0.2-5',
     '0.0.2' ],
  maintainers: 'reedog117 <patrickc81@gmail.com>',
  time:
   { modified: '2015-07-10T17:35:35.324Z',
     created: '2015-02-11T06:09:25.778Z',
     '0.0.1': '2015-02-11T06:09:25.778Z',
     '0.0.1-1': '2015-02-13T18:26:33.006Z',
     '0.0.2': '2015-02-27T15:50:18.457Z',
     '0.0.2-1': '2015-03-03T15:43:04.122Z',
     '0.0.2-2': '2015-03-03T16:55:19.283Z',
     '0.0.2-3': '2015-06-01T18:23:05.862Z',
     '0.0.2-5': '2015-07-10T17:35:35.324Z' },
  homepage: 'https://github.com/reedog117/node-vsphere-soap#readme',
  keywords: [ 'vsphere', 'vcenter', 'api', 'soap', 'wsdl' ],
  repository:
   { type: 'git',
     url: 'git+https://github.com/reedog117/node-vsphere-soap.git' },
  author: 'reedog117',
  bugs: { url: 'https://github.com/reedog117/node-vsphere-soap/issues' },
  license: 'MIT',
  readmeFilename: 'README.md',
  users: { agilemation: true },
  version: '0.0.2-5',
  main: 'lib/client.js',
  scripts: { test: 'lab' },
  dependencies: { lodash: '3.x.x', soap: '0.8.0', 'soap-cookie': '0.10.x' },
  devDependencies: { code: '1.x.x', lab: '5.x.x' },
  preferGlobal: false,
  gitHead: 'a28a5c05aef9709c32de62fe4fc7d6faa84da3bc',
  dist:
   { shasum: 'e055a17d23452276b0755949b163e16b4214755c',
     tarball: 'http://registry.npmjs.org/node-vsphere-soap/-/node-vsphere-soap-0.0.2-5.tgz' },
  directories: {} }
JavaScriptDude commented 9 years ago

Very weird. Let me kick the box a bit more...

On September 16, 2015 12:21:26 PM EDT, Patrick C notifications@github.com wrote:

That's weird -- when I do an npm info node-vsphere-soap it looks like it's already there...

pc-macbook:~ pat$ npm info node-vsphere-soap

{ name: 'node-vsphere-soap',
description: 'interface to vSphere SOAP/WSDL from node for interfacing
with vCenter or ESXi',
 'dist-tags': { latest: '0.0.2-5' },
 versions:
  [ '0.0.1-1',
    '0.0.1',
    '0.0.2-1',
    '0.0.2-2',
    '0.0.2-3',
    '0.0.2-5',
    '0.0.2' ],
 maintainers: 'reedog117 <patrickc81@gmail.com>',
 time:
  { modified: '2015-07-10T17:35:35.324Z',
    created: '2015-02-11T06:09:25.778Z',
    '0.0.1': '2015-02-11T06:09:25.778Z',
    '0.0.1-1': '2015-02-13T18:26:33.006Z',
    '0.0.2': '2015-02-27T15:50:18.457Z',
    '0.0.2-1': '2015-03-03T15:43:04.122Z',
    '0.0.2-2': '2015-03-03T16:55:19.283Z',
    '0.0.2-3': '2015-06-01T18:23:05.862Z',
    '0.0.2-5': '2015-07-10T17:35:35.324Z' },
 homepage: 'https://github.com/reedog117/node-vsphere-soap#readme',
 keywords: [ 'vsphere', 'vcenter', 'api', 'soap', 'wsdl' ],
 repository:
  { type: 'git',
    url: 'git+https://github.com/reedog117/node-vsphere-soap.git' },
 author: 'reedog117',
bugs: { url: 'https://github.com/reedog117/node-vsphere-soap/issues' },
 license: 'MIT',
 readmeFilename: 'README.md',
 users: { agilemation: true },
 version: '0.0.2-5',
 main: 'lib/client.js',
 scripts: { test: 'lab' },
dependencies: { lodash: '3.x.x', soap: '0.8.0', 'soap-cookie': '0.10.x'
},
 devDependencies: { code: '1.x.x', lab: '5.x.x' },
 preferGlobal: false,
 gitHead: 'a28a5c05aef9709c32de62fe4fc7d6faa84da3bc',
 dist:
  { shasum: 'e055a17d23452276b0755949b163e16b4214755c',
tarball:
'http://registry.npmjs.org/node-vsphere-soap/-/node-vsphere-soap-0.0.2-5.tgz'
},
 directories: {} }

Reply to this email directly or view it on GitHub: https://github.com/reedog117/node-vsphere-soap/issues/7#issuecomment-140793061

Sent from my Android device with K-9 Mail. Please excuse my brevity.

JavaScriptDude commented 9 years ago

Check this out:

nvm use node Now using node v4.0.0 npm install node-vsphere-soap node-vsphere-soap@0.0.2 node_modules/node-vsphere-soap ├── soap-cookie@0.10.1 ├── lodash@3.10.1 └── soap@0.6.1 (sax@1.1.3, lodash@2.4.2, strip-bom@0.3.1, request@2.62.0) ~

When I run npm info node-vsphere-soap, I get the same output as you.

Any idea why npm is doing this? Could this be something to do with the order of versions in 'versions' property?

-Tim

On 09/16/2015 12:21 PM, Patrick C wrote:

That's weird -- when I do an |npm info node-vsphere-soap| it looks like it's already there...

|pc-macbook:~ pat$ npm info node-vsphere-soap { name: 'node-vsphere-soap', description: 'interface to vSphere SOAP/WSDL from node for interfacing with vCenter or ESXi', 'dist-tags': { latest: '0.0.2-5' }, versions: [ '0.0.1-1', '0.0.1', '0.0.2-1', '0.0.2-2', '0.0.2-3', '0.0.2-5', '0.0.2' ], maintainers: 'reedog117 patrickc81@gmail.com', time: { modified: '2015-07-10T17:35:35.324Z', created: '2015-02-11T06:09:25.778Z', '0.0.1': '2015-02-11T06:09:25.778Z', '0.0.1-1': '2015-02-13T18:26:33.006Z', '0.0.2': '2015-02-27T15:50:18.457Z', '0.0.2-1': '2015-03-03T15:43:04.122Z', '0.0.2-2': '2015-03-03T16:55:19.283Z', '0.0.2-3': '2015-06-01T18:23:05.862Z', '0.0.2-5': '2015-07-10T17:35:35.324Z' }, homepage: 'https://github.com/reedog117/node-vsphere-soap#readme', keywords: [ 'vsphere', 'vcenter', 'api', 'soap', 'wsdl' ], repository: { type: 'git', url: 'git+https://github.com/reedog117/node-vsphere-soap.git' }, author: 'reedog117', bugs: { url: 'https://github.com/reedog117/node-vsphere-soap/issues' }, license: 'MIT', readmeFilename: 'README.md', users: { agilemation: true }, version: '0.0.2-5', main: 'lib/client.js', scripts: { test: 'lab' }, dependencies: { lodash: '3.x.x', soap: '0.8.0', 'soap-cookie': '0.10.x' }, devDependencies: { code: '1.x.x', lab: '5.x.x' }, preferGlobal: false, gitHead: 'a28a5c05aef9709c32de62fe4fc7d6faa84da3bc', dist: { shasum: 'e055a17d23452276b0755949b163e16b4214755c', tarball: 'http://registry.npmjs.org/node-vsphere-soap/-/node-vsphere-soap-0.0.2-5.tgz' }, directories: {} } |

— Reply to this email directly or view it on GitHub https://github.com/reedog117/node-vsphere-soap/issues/7#issuecomment-140793061.

reedog117 commented 8 years ago

That's a good question -- gimme some time to look into it. I haven't tried running this stuff on node v4.0.0 at all -- I wonder if one of its dependencies is doing something to bring the versions of everything else back a bit?

JavaScriptDude commented 8 years ago

I think you are onto something...

I downgraded to 0.12.7 and problem was still there but when I downgraded to 0.10.38, the correct soap version was picked up:

nvm use 0.10.38 Now using node v0.10.38 npm install node-vsphere-soap --save npm WARN engine cryptiles@2.0.5: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.38","npm":"1.4.28"}) npm WARN engine hoek@2.16.3: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.38","npm":"1.4.28"}) npm WARN engine boom@2.9.0: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.38","npm":"1.4.28"}) node-vsphere-soap@0.0.2-5 node_modules/node-vsphere-soap ├── soap-cookie@0.10.1 ├── lodash@3.10.1 └── soap@0.8.0 (sax@1.1.3, lodash@2.4.2, strip-bom@0.3.1, request@2.63.0) ~

I wonder where the gate is that decides to use an older version of soap for newer versions of Node.

reedog117 commented 8 years ago

I haven't had time to research it further, but it seems the behavior changes even between minor releases within v0.12

pc-macbook:nvstest pat$ nvm use v4.1.1
Now using node v4.1.1 (npm v2.14.4)
pc-macbook:nvstest pat$ npm install node-vsphere-soap
node-vsphere-soap@0.0.2 node_modules/node-vsphere-soap
├── soap-cookie@0.10.1
├── lodash@3.10.1
└── soap@0.6.1 (sax@1.1.3, lodash@2.4.2, strip-bom@0.3.1, request@2.63.0)
pc-macbook:nvstest pat$ rm -rf *
pc-macbook:nvstest pat$ nvm use v0.12
Now using node v0.12.4 (npm v2.10.1)
pc-macbook:nvstest pat$ npm install node-vsphere-soap
node-vsphere-soap@0.0.2-5 node_modules/node-vsphere-soap
├── soap-cookie@0.10.1
├── lodash@3.10.1
└── soap@0.8.0 (sax@1.1.3, strip-bom@0.3.1, lodash@2.4.2, request@2.63.0)
pc-macbook:nvstest pat$ rm -rf *
pc-macbook:nvstest pat$ nvm install v0.12
######################################################################## 100.0%
Now using node v0.12.7 (npm v2.11.3)
pc-macbook:nvstest pat$ npm install node-vsphere-soap
node-vsphere-soap@0.0.2 node_modules/node-vsphere-soap
├── soap-cookie@0.10.1
├── lodash@3.10.1
└── soap@0.6.1 (sax@1.1.3, strip-bom@0.3.1, lodash@2.4.2, request@2.63.0)
pc-macbook:nvstest pat$
JavaScriptDude commented 8 years ago

Interesting. I suspect its something related to the soap library configuration. Hopefully I get a chance to look at this deeper in the next couple of days.

I wonder if NPM has a version debug utility to see what is driving the version selection rules down the depends stack...

On September 24, 2015 12:54:59 PM EDT, Patrick C notifications@github.com wrote:

I haven't had time to research it further, but it seems the behavior changes even between minor releases within v0.12

pc-macbook:nvstest pat$ nvm use v4.1.1
Now using node v4.1.1 (npm v2.14.4)
pc-macbook:nvstest pat$ npm install node-vsphere-soap
node-vsphere-soap@0.0.2 node_modules/node-vsphere-soap
├── soap-cookie@0.10.1
├── lodash@3.10.1
└── soap@0.6.1 (sax@1.1.3, lodash@2.4.2, strip-bom@0.3.1,
request@2.63.0)
pc-macbook:nvstest pat$ rm -rf *
pc-macbook:nvstest pat$ nvm use v0.12
Now using node v0.12.4 (npm v2.10.1)
pc-macbook:nvstest pat$ npm install node-vsphere-soap
node-vsphere-soap@0.0.2-5 node_modules/node-vsphere-soap
├── soap-cookie@0.10.1
├── lodash@3.10.1
└── soap@0.8.0 (sax@1.1.3, strip-bom@0.3.1, lodash@2.4.2,
request@2.63.0)
pc-macbook:nvstest pat$ rm -rf *
pc-macbook:nvstest pat$ nvm install v0.12
########################################################################
100.0%
Now using node v0.12.7 (npm v2.11.3)
pc-macbook:nvstest pat$ npm install node-vsphere-soap
node-vsphere-soap@0.0.2 node_modules/node-vsphere-soap
├── soap-cookie@0.10.1
├── lodash@3.10.1
└── soap@0.6.1 (sax@1.1.3, strip-bom@0.3.1, lodash@2.4.2,
request@2.63.0)
pc-macbook:nvstest pat$

Reply to this email directly or view it on GitHub: https://github.com/reedog117/node-vsphere-soap/issues/7#issuecomment-142986960

Sent from my Android device with K-9 Mail. Please excuse my brevity.