VMware {code} Community
lhuston
Contributor
Contributor

Migration Tool for new JavaScript API

I am attempting to run the Migration Tool to migrate from the Bridge API to the new JavaScript API. I can not seem to get it to run. I have followed the instructions and suspect the issue is with sending the correct parameters for my project. After q fair amount of trial and error, I am using the following command:

C:\vsphere-client-sdk-6.7.U1Virgo\html-client-sdk\tools\API migration tool>npm run -s migrate generateMigrationFile -- --project='C:/workspace/Personal/vSphereNewAPI/TsmVMwareHTML5' --migrationFile=apiMigrate.txt

I get the following:

The project ''C:/workspace/Personal/vSphereNewAPI/TsmVMwareHTML5' does not exist.

I've also tried reversing the directory slashes:

C:\vsphere-client-sdk-6.7.U1Virgo\html-client-sdk\tools\API migration tool>npm run -s migrate generateMigrationFile -- --project='C:\workspace\Personal\vSphereNewAPI\TsmVMwareHTML5' --migrationFile=apiMigrate.txt

I've also tried adding the project to the tools directory adn using a relative path.. same error.

What is the correct format to pass in a directory on Windows?

Reply
0 Kudos
4 Replies
stoevm
VMware Employee
VMware Employee

Hi ihuston,

Remove the single quotation marks after the equals sign in the project argument.

For example: 

--project=C:\workspace\Personal\vSphereNewAPI\TsmVMwareHTML5

Best,
Martin

Reply
0 Kudos
lhuston
Contributor
Contributor

I tried that, but got the directory '' does not exist.

Here's the output from my 3 types of attempts:

C:\vsphere-client-sdk-6.7.U1Virgo\html-client-sdk\tools\API migration tool>npm run -s migrate generateMigrationFile -- --project=C:\workspace\Personal\vSphereNewAPI\TsmVMwareHTML5 --migrationFile=apiMigrate.txt
The directory '' does not exists.

C:\vsphere-client-sdk-6.7.U1Virgo\html-client-sdk\tools\API migration tool>npm run -s migrate generateMigrationFile -- --project=C:/workspace/Personal/vSphereNewAPI/TsmVMwareHTML5 --migrationFile=apiMigrate.txt
The directory '' does not exists.

C:\vsphere-client-sdk-6.7.U1Virgo\html-client-sdk\tools\API migration tool>npm run -s migrate generateMigrationFile -- --project=TsmVMwareHTML5 --migrationFile=apiMigrate.txt
The directory '' does not exists.

Any other suggestions?

Reply
0 Kudos
stoevm
VMware Employee
VMware Employee

The directory where you want your migration file to be created must exist.

 

meaning that the value of the migrationFile argument should be some directory already present on the file system + 'filename'.

 

Best,

Martin

Reply
0 Kudos
lhuston
Contributor
Contributor

That worked - thanks!

For anyone who references this thread in the future, my final command was:

C:\vsphere-client-sdk-6.7.U1Virgo\html-client-sdk\tools\API migration tool>npm run -s migrate generateMigrationFile -- --project=C:/workspace/Personal/vSphereNewAPI/TsmVMwareHTML5 --migrationFile=C:\workspace\Personal\vSphereNewAPI\apiMigrate.txt --overwrite

 

Thanks again!

Lisa