on 02-03-2019 8:30 PM
Hello,
I have HANA XSA instance with node.js version 6.11.* and according to node,green it should support many features of ES6, including spread operators. I have enabled es6 in eslint environment in Web IDE for HANA, however deployment to XSA always fails and the syntax error points to a spread operator. The thing is that the error occurs in some module downloaded from npm, so clearing ES6 syntax is not an option.
Is there any other configuration point? Or in practice ES6 is not supported?
Maybe share the code you are trying. I did see this online:
https://stackoverflow.com/questions/40066731/node-v6-failing-on-object-spread
Also maybe share more of your package.json. Just this online might not indicate if you have a problem elsewhere. Also you can see in the build log the version Node.js it is using. You can also use the xs command line xs runtimes to see the versions of Node.js available in your XSA release.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the reference, apparently v6.11 doe not support object properties spreading as it's ES2018.
The log shows the following report, apparently it does not understand super({...{readableObjectMode: true}, ...opts}):
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000}
span.s1 {font-variant-ligatures: no-common-ligatures}
2/3/19 7:56:26.783 PM [APP/297-0] ERR/hana/shared/H01/xs/app_working/tjchana01/executionroot/847ef548-83f8-4ddd-8dc7-c4ba6af75a80/app/node_modules/csv-parse/lib/index.js:19
2/3/19 7:56:26.783 PM [APP/297-0] ERRsuper({...{readableObjectMode: true}, ...opts})
2/3/19 7:56:26.783 PM [APP/297-0] ERR ^^^
2/3/19 7:56:26.783 PM [APP/297-0] ERRSyntaxError: Unexpected token ...
2/3/19 7:56:26.783 PM [APP/297-0] ERRat createScript (vm.js:56:10)
2/3/19 7:56:26.783 PM [APP/297-0] ERRat Object.runInThisContext (vm.js:97:10)
XS reports these runtimes:
Getting runtimes...
type version id resolved active descriptionbound apps
----------------------------------------------------------------------------------------------------------
hanajdbc1110.5 6true true SAP HANA JDBC Driver 1.110.5 0
hanajdbc20.6 7true true SAP HANA JDBC Driver 2.0.6 6
node4.84.135true true Node.js 4.8.4.13 for Linux x86-647
node6.11 1.0 3true true Node.js 6.11.1 for Linux x86-6439
sapjvm81.291true true SAP JVM 8 Patchlevel 29 for Linux x86-64 2
sapjvm8_jre1.294true true SAP JVM JRE 8 Patchlevel 29 for Linux x86-64 8
tomcat85.150true true Apache Tomcat Web Container 8.5.15 10
tomee1.7_jaxrs 4 2true true Apache TomEE jaxrs 1.7.4 0
Can I install only node buildpack?
You could upgrade your XSA Runtime. The SPS 03 level of XSA Runtime (which is backwards compatible with any supported version of HANA) has Node.js 8.x. My system has specifically 8.14. For HANA 2.0 SPS 04 (which is planned for May delivery), we plan to have support for Node.js 10.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What version of node are you specifying in your package.json? Multiple versions of Node.js are delivered with XSA at any one release and your package.json tells XSA runtime which version of Node to use for your service.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.