cancel
Showing results for 
Search instead for 
Did you mean: 

/bin/sh: tns: command not found when building MDK Client.

james_murphy01
Product and Topic Expert
Product and Topic Expert
0 Kudos

Trying to build the SAM MDK client however the build is failing.

https://help.sap.com/viewer/d2e76ee96b6141c9bfc3afae96b7aa71/1911/en-US/50d2c45ad08b4231b1c3fcc0c096...

MDK Dependencies Installer is all green for iOS => Your development environment is ready for MDK development! You’re ready to go to the next step!

Mobile Development Kit MDK CLIENT ==> MDKCLNT01P_5-80005072.ZIP
Metadata for SAP Asset Manager 1911 from the SAP ==> ASTMGRMETDTA00_0-80004961.ZIP
Asset Manager Branding SDK 4.0 ==> ASSET_MNGR_SDK00_0-80004962.ZIP
Asset Manager plug-in for iOS => MDKPLGNSDKIOS00P_1-80004970.ZIP

At set 9: Create the SAP Asset Manager client, is where i get the error saying that a command cannot be found.

User@UNKNOWN MDKClient_SDK % ./create-client.command
? Enter the path of the .mdkproject directory. ../SAM.mdkproject
Using ../SAM.mdkproject
Using /Users/User/Desktop/SAP [Work]/SAPAssetManager1911/MDKClient_SDK for out directory
? Would you like to build for iOS or Android or All? iOS
Building client for iOS
? Would you like to build for device or simulator of iOS? device
Building client for device of iOS
Removing existing directory /Users/User/Desktop/SAP [Work]/SAPAssetManager1911/MDKClient_SDK/SAM360
Creating application SAM360
/bin/sh: tns: command not found

/bin/sh: tns: command not found

Error: Failed to create application

-----------------------MDKProject.Json-----------------------
{

"AppName": "SAMIntel360",
"AppVersion": "1911.0.0",
"BundleID": "com.sap.mobile.apps.assetmanager.release",
"UrlScheme": "samIclient"
}

-----------------------------------------------------------------------

Accepted Solutions (1)

Accepted Solutions (1)

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

This would be due to a pathing issue in your terminal. Please make sure you have setup NVM for your shell using the following commands.

export NVM_DIR=“$HOME/.nvm”
[ -s “$NVM_DIR/nvm.sh” ] && \. “$NVM_DIR/nvm.sh”  # This loads nvm
[ -s “$NVM_DIR/bash_completion” ] && \. “$NVM_DIR/bash_completion”  # This loads nvm bash_completion

Verify that you can check the nativescript version from the terminal

nativescript --version

If that returns the correct version number please try the create-client again.

--Bill

james_murphy01
Product and Topic Expert
Product and Topic Expert
0 Kudos

Thanks Bill, Switched to bash shell and maintained the profile. After this was able to run the

nativescript --version

I was then able to run the build properly.

Answers (0)