apnex / vmw-cli

CLI and API for programmatic access to my.vmware.com
MIT License
30 stars 9 forks source link

Fix versions from upstream modules #12

Open remkolodder opened 2 years ago

remkolodder commented 2 years ago

The latest versions from Chalk and Got require "ESM" and a different way of using the code. Require becomes import and more changes like that. To fix this, use the old version that is also in the docker image.

hugopow commented 2 years ago

Attempted to try to find an old version but no luck. Do you have an older version that does not error with 'ERR_REQUIRE_ESM'?

remkolodder commented 2 years ago

Hi Hugo,

yes, well if you use the version that I specify in package.json it will pull in the correct versions. You have to install the version on my temp branch:

npm install https://github.com/remkolodder/vmw-sdk and npm install https://github.com/remkolodder/vmw-cli to have them going.

I use them at work regularly without issues :-) Thanks Remko

hugopow commented 2 years ago

I'm not sure if I'm doing this incorrectly. Need an idiots guide.

npm install https://github.com/remkolodder/vmw-sdk npm ERR! code ENOENT npm ERR! syscall spawn git npm ERR! path git npm ERR! errno -2 npm ERR! enoent Error while executing: npm ERR! enoent undefined ls-remote -h -t https://github.com/remkolodder/vmw-sdk.git npm ERR! enoent npm ERR! enoent npm ERR! enoent spawn git ENOENT npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent

remkolodder commented 2 years ago

Hi,

I am sorry, the git part is appended:

npm install https://github.com/remkolodder/vmw-sdk.git --global npm install https://github.com/remkolodder/vmw-cli.git --global

This works for us and uses the working versions of the software :)

hugopow commented 2 years ago

Getting another error.

`npm install https://github.com/remkolodder/vmw-sdk.git --global npm ERR! code ENOENT npm ERR! syscall spawn git npm ERR! path git npm ERR! errno -2 npm ERR! enoent Error while executing: npm ERR! enoent undefined ls-remote -h -t https://github.com/remkolodder/vmw-sdk.git npm ERR! enoent npm ERR! enoent npm ERR! enoent spawn git ENOENT npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2022-04-07T11_34_07_274Z-debug.log`

remkolodder commented 2 years ago

Ah but you do not have git available?

hugopow commented 2 years ago

That was it! Forgot to install git onto my new docker image! Thanks for the help, working now.

remkolodder commented 1 year ago

I have added a part of the pull request to initialise the storage for the cache. The "init()" was missing from the cache storage, and therefor breaking my usage of the vmw-cli application. After adding this, caching works again and i can read the vmware upstream repositories.

Please consider merging these, in addition to the other update (https://github.com/apnex/vmw-cli/pull/13) that brings this into a more future proof form.