cancel
Showing results for 
Search instead for 
Did you mean: 

SHINE - SAP HANA EXPRESS 2.0 SPS06

ramaanne
Participant
0 Kudos

HI

While trying to compile the github repo as per shine docs ,using sap hana web ide for sap hana (Sap hana express sps06)

in the step where I started the nodejs apps - core-node,core-xsjs,user-xsjs,and then while starting the web app (fiorilaunchpad index.html) to generate shine role collections and sample data ,the web app does not start and i get an error as below from third party node_module http-cookie-agent file cookie_agent.js file ,the error is pasted below and a screen shot attached so I request the sap hana express community to help me as this is a show stopper (while deploying SHINE XSA)

---

1/14/23 12:03:02.813 AM [APP/8-0] ERR /hana/shared/HXE/xs/app_working/embedded_execagent/executionroot/3807a2ed-18f4-46c0-906d-088ca12734f9/app/node_modules/http-cookie-agent/dist/create_cookie_agent.js:161/14/23 12:03:02.813 AM [APP/8-0] ERR jar;1/14/23 12:03:02.813 AM [APP/8-0] ERR ^1/14/23 12:03:02.813 AM [APP/8-0] ERR1/14/23 12:03:02.813 AM [APP/8-0] ERR SyntaxError: Unexpected token ;1/14/23 12:03:02.813 AM [APP/8-0] ERR at Module._compile (internal/modules/cjs/loader.js:723:23)1/14/23 12:03:02.813 AM [APP/8-0] ERR at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)1/14/23 12:03:02.813 AM [APP/8-0] ERR at Module.load (internal/modules/cjs/loader.js:653:32)1/14/23 12:03:02.813 AM [APP/8-0] ERR at tryModuleLoad (internal/modules/cjs/loader.js:593:12)1/14/23 12:03:02.813 AM [APP/8-0] ERR at Function.Module._load (internal/modules/cjs/loader.js:585:3)1/14/23 12:03:02.813 AM [APP/8-0] ERR at Module.require (internal/modules/cjs/loader.js:692:17)1/14/23 12:03:02.813 AM [APP/8-0] ERR at require (internal/modules/cjs/helpers.js:25:18)1/14/23 12:03:02.813 AM [APP/8-0] ERR at Object.<anonymous> (/hana/shared/HXE/xs/app_working/embedded_execagent/executionroot/3807a2ed-18f4-46c0-906d-088ca12734f9/app/node_modules/http-cookie-agent/dist/index.js:4:29)1/14/23 12:03:02.814 AM [APP/8-0] ERR at Module._compile (internal/modules/cjs/loader.js:778:30)1/14/23 12:03:02.814 AM [APP/8-0] ERR at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)

Accepted Solutions (1)

Accepted Solutions (1)

ramaanne
Participant
0 Kudos

---

I have progressed further in Shine installation for SAP HANA EXPRESS 2.0 SPS06

-=======================

So the above error I posted to happen because - the node module Http-Cookie-Agent is using syntax in js files like

create_cookie_agent.js and mixed_cookie_agent.js - for example the vars are declared in the class - like jar;
_httpAgent; _httpsAgent; these variables need to be commented out as ES6 standard does not allow class level variable declarations ,that is why SAP WEB IDE FOR SAP HANA is not able to build hana-shine-xsa projects web module (see above) , once i got past this errori could build and launch web module but see below

---

There is another error that says the user running the SAP WEB IDE FOR SAP HANA in my case it is xsa_dev user does not have the role collection XSA_AUTHORIZATION_ADMIN even though the user is assigned that role collection already .. so on further investigating i came to know when I issue xs s (list services) in space development ,there is a service - XSA_DEV-elql9qtk8w1iwfcp-hana-shine-xsa-shine-uaa(created by userxsjs module ) and also shine documentation says to create shine-uaa service with xs-security.json file as input ,so basically these two services conflict and error happens so what i did is deleted XSA_DEV-elql9qtk8w1iwfcp-hana-shine-xsa-shine-uaa both services shine-uaa service , I again recreated XSA_DEV-elql9qtk8w1iwfcp-hana-shine-xsa-shine-uaa with xs-secrity.json file as parameter and then launched web module ,this time success i could create shine_admin role collection logout and assign shine_admin role collection to xsa_dev user logback in and i could launch the web portal

Hope the above helps the SAP HANA EXPRESS community members

thanks & regards

Rama Anne

0 Kudos

Hi Rama Anne,

Thanks for sharing the resolution .

It would helpful if you could elaborate on what exactly you did to overcome the syntax error issue while running the web app ? did you upgrade the webide ? if yes what was your version that gave you this error ?

create_cookie_agent.js and mixed_cookie_agent.js

Thanks,

Goutham

Answers (1)

Answers (1)

ramaanne
Participant
0 Kudos

Hi goutham.nagarajnaidu

it is related to Javasceript ES6 syntax ,please read above as "....these variables need to be commented out as ES6 standard does not allow class level variable..." in my comment(above)

what has happened is that SAP HANA EXPRESS SPS06 is using newer node modules (node version ) and Http-Cookie-Agent (Node module ) is using < ES6 style syntax so as I mentioned I just commented class level vars decalarations (to be compatible with ES6)

regards

rama anne