Error when generating an oData client
See original GitHub issueHi,
When I want to generate an oData client from a service metadata specification I am getting the following error:
ERROR (generator-cli): ErrorWithCause: Generation of services failed.
at /home/user/.node_modules_global/lib/node_modules/@sap-cloud-sdk/generator/dist/generator-cli.js:22:18
Caused by:
Error: Compilation Errors:
/home/user/projects/GeneratedODataClients/BatchRequest.ts:2:10 - error TS2305: Module '"@sap-cloud-sdk/util"' has no exported member 'transformVariadicArgumentToArray'.
at transpileDirectory (/home/user/.node_modules_global/lib/node_modules/@sap-cloud-sdk/generator/node_modules/@sap-cloud-sdk/generator-common/dist/compiler.js:35:15)
at async Promise.all (index 0)
at async generate (/home/user/.node_modules_global/lib/node_modules/@sap-cloud-sdk/generator/dist/generator.js:57:13)
I installed the @sap-cloud-sdk/generator
globally and also installed the @sap-cloud-sdk/odata-v2
package in my project.
Note: For Development environment I am using SAP Business Application Studio.
Issue Analytics
- State:
- Created a year ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
OData Client Code Generator Error - Microsoft Dynamics AX ...
OData Client Code Generator Error ... The actual problem is in metadata. There is an Enum with name "ItemType" and also the Data...
Read more >VS 2017 15.4.2 Broken client · Issue #985 · OData/odata.net
I think this is because the generated code uses Parse instead of TryParse in LoadModelFromString. As such it always throws an error. Just...
Read more >Why do I get a Precision error when generating OData v4 ...
I'm using OData v4 Client Code Generator to convert a customer OData v4 metadata to generate strongly type object so I can build...
Read more >OData v4 Client Code Generation not working after upgrade to ...
ODatav4ClientCodeGenerator the following error appears: Steps to Reproduce. 1. Open Visual Studio 2. Install the "OData v4 Client Code ...
Read more >2467921 - Failed to build the Offline OData client database.
When doing a first load of data in an offline SAP Mobile Platform application, the error below gets generated: [-10210] The operation failed...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Just confirming that the fix by @marikaner worked for me. Installing
@types/node
locally allowed me to generate the client.Hi all, Sorry for the late reply. Yes now everything is working