question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error when generating an oData client

See original GitHub issue

Hi,

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:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
jmsrppcommented, Sep 14, 2022

Just confirming that the fix by @marikaner worked for me. Installing @types/node locally allowed me to generate the client.

1reaction
strahilgcommented, Sep 15, 2022

Hi all, Sorry for the late reply. Yes now everything is working

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found