-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WSL: hana-cli hdi --cf false --> **/bin/sh: 1: Syntax error: Unterminated quoted string** #56
Comments
In wsl you have the xs command line installed? This command branches out the xs command. As far as filtering - yes this command only returns hdi-shared plans. That's why the command is called "hdi" - it only returns HDI container instances. securestore and sbss wouldn't be HDI. |
yes, I'm able to connect via xs with the hana system using WSL.
Is there a way to get the other plans by using hana-cli? |
I just pushed a new version to npm. It fixes the issue on WSL (which oddly enough was just a missing closing quote on the URL generation). I also added new commands that will lookup service plans filtered by sbss, securestore and schema (named schemaInstances because we already have a schema/schemas command that looks at the DB catalog directly). |
Ok, everything works fine. Thank you for the fast fix and the new features! |
* no user-defined types (#9) * Version 2.202105.9 * Integrate mass rename proposal * Fixes for rename without namespace * Update README.md * Update README.md * Update README.md * Remove AFL Lang from hdiconfig on HANA Cloud * Fix connect issue in clean system * Fix Issue SAP-samples#56 * Fix Issue SAP-samples#57 Co-authored-by: Thomas Jung <thomas.jung@sap.com>
hi Thomas, maybe you have an idea to throw a different error message, while using the wrong npm version. This command hana-cli hdi --cf false (connecting an XSA platform by using xs-cli) leads with the wrong npm version (in my case v15.5.0) to this error msg. With v14.17.3 every works fine. (I'm asking because I had this issue more times in the past and it took me some time until I realized the reason of the issue) |
You only get a message back that says wrong npm version? That's interesting. Does the please use cf login first message come next? You were able to install hana-cli on node 15? Or did you install hana-cli and then upgrade the node version? Because the engines section should be checked during installation and restriction to node 12 and 14. |
I would like to see this message "you use the wrong npm version", instead of Connection Problems: Error: CF configuration missing. Please use cf login first My nvm is default 15.5.0 and I always forget to change it to the right version 12 or 14. Now I changed the nvm default version and it won't happen so fast for me again, but I guess there are other users would have the same problem.
|
So you are changing the node version after install. OK - I can probably put a version check on any command startup and report back the error right away. |
The problem exists only because I used a wrong npm after the installation. |
Thanks for your detailed explanation! Its really weird and I didn't get this fixed.
I tried both remote WSL and not remote WSL, but it doesn't make any difference. (screenshot)
I don't know.
For the moment I don't have a clue what I did wrong. But it helps me a lot to know that here is something wrong! |
Because of this strange behavior, I came across VS Code Docker Remote Containers and was wondering if there is already a sample development container from your team that contains the environment with a hana-cli (cf-cli or xs-cli) and all required things. |
Actually I just added a development container configuration to this project last night: https://github.com/SAP-samples/hana-developer-cli-tool-example/blob/main/CHANGELOG.md#changed It creates a development container with all the supporting tools (like the cf command line, @sap/cds-dk, etc) that you would need to develop further functionality in the hana-cli itself. It doesn't install the hana-cli because that's the project it pulls in by default to work on. But you can just do a npm install and then npm link and run it from the sources within the development container as well. It also allows you to setup and develop or use the project within Codespaces. But back to your original problem - when you run the hana-cli version command notice you aren't receiving the Node.js version in the output. Towards the end of the output of the command in my environment (or in the Codespaces screenshot above as well), it lists the Node.js version that hana-cli is seeing. I'm just using process.version in that instance. But most importantly what I notice is that it is showing an old version of the hana-cli itself. In your screenshots, it's reporting 2.202104.04. That's a few months old. The current version on npm is 2.202107.5. |
Unbelievable, I swear I didn't see it before in your project. This is absolutely awesome! :) |
thank you, I wasn't aware of it before. This could also be a reason why I am not getting the new warning you added a few days ago (because there is no node validation check). I think I did a wrong hana-cli installation. :( I did not critically question the wrong hana-cli installation under Windows because the valid node version for hana-cli worked for me. But of course that was stupid. But I'm still wondering why Remote WSL runs the node version 14.7.3. from my OS host. Now I need to fix the npm issue. |
Well first keep in mind when using nvm, that when you switch node versions that the node_modules folder storing your global modules is within each particular version. If you are using nvm and switching back and forth between versions, the most recent installation of any global modules does not copy over when you switch. This has bitten me before as well. I'll switch versions only to find I'm suddenly using an older version of @sap/cds-dk or some other global utility like hana-cli. On WSL I wonder if that's the inherited environment path from the host OS. Perhaps it doesn't find the module in the expected location in the guest OS but then just starts looking through the PATH for it. It won't find it in the path of the guest OS but if it also searches the locations in the PATH of the HOST Windows OS and runs it from there. But that would mean that it's not only finding node_modules folder from the host OS but also running the Node.js runtime itself from the host OS. But I'd be a little surprised if that worked on the Node.js runtime itself since that should be platform specific. So in the end; not exactly sure what's happened there in the WSL situation. |
I did the same request with PowerShell ans WSL. PS works fine, but WSL gives me an error. /bin/sh: 1: Syntax error: Unterminated quoted string
But I do have one more question.
Is there a filter for only hana instances with hdi-shared plans? I miss hana services with securestore and sbss plans in the result.
The text was updated successfully, but these errors were encountered: