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.

Unable to generate API SDK for Azure Time Series Insights

See original GitHub issue

Before asking the question:

I’m trying to follow the myriad of doc fragments to generate this API, and it is frustrating. Is there any nuget already packaged for the different versions?

❯ autorest .\azure-rest-api-specs\specification\timeseriesinsights\data-plane\readme.md --csharp-sdks-folder=.\Generated --csharp --verbose --latest --azure-validator --semantic-validator

WARNING: AutoRest has not been tested with Node versions greater than v14.

AutoRest code generation utility [cli version: 3.1.4; node: v15.12.0, max-memory: 4096 MB]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
   Loading AutoRest core      'C:\Users\iskan\AppData\Roaming\npm\node_modules\@autorest\core\dist' (3.2.4)
VERBOSE [0.7 s]: > Initial configuration file 'file:///C:/Users/iskan/source/repos/GitHub/azure-rest-api-specs/specification/timeseriesinsights/data-plane/readme.md'
VERBOSE [0.7 s]: > Including configuration file 'file:///C:/Users/iskan/source/repos/GitHub/azure-rest-api-specs/specification/timeseriesinsights/data-plane/readme.md'
VERBOSE [0.73 s]: > Including configuration file 'file:///C:/Users/iskan/AppData/Roaming/npm/node_modules/@autorest/core/dist/resources/default-configuration.md'
VERBOSE [0.75 s]: > Including configuration file 'file:///C:/Users/iskan/AppData/Roaming/npm/node_modules/@autorest/core/dist/resources/inspect.md'
VERBOSE [0.76 s]: > Including configuration file 'file:///C:/Users/iskan/AppData/Roaming/npm/node_modules/@autorest/core/dist/resources/directives.md'
VERBOSE [0.78 s]: > Including configuration file 'file:///C:/Users/iskan/AppData/Roaming/npm/node_modules/@autorest/core/dist/resources/pipeline.md'
VERBOSE [0.81 s]: > Including configuration file 'file:///C:/Users/iskan/AppData/Roaming/npm/node_modules/@autorest/core/dist/resources/loader-openapi.md'
VERBOSE [0.83 s]: > Including configuration file 'file:///C:/Users/iskan/AppData/Roaming/npm/node_modules/@autorest/core/dist/resources/miscellaneous.md'
VERBOSE [0.85 s]: > Including configuration file 'file:///C:/Users/iskan/AppData/Roaming/npm/node_modules/@autorest/core/dist/resources/patches.md'
VERBOSE [0.88 s]: > Including configuration file 'file:///C:/Users/iskan/AppData/Roaming/npm/node_modules/@autorest/core/dist/resources/plugin-powershell.md'
VERBOSE [0.91 s]: > Including configuration file 'file:///C:/Users/iskan/AppData/Roaming/npm/node_modules/@autorest/core/dist/resources/plugin-azureresourceschema.md'
VERBOSE [0.93 s]: > Including configuration file 'file:///C:/Users/iskan/AppData/Roaming/npm/node_modules/@autorest/core/dist/resources/plugin-csharp.md'
VERBOSE [0.95 s]: > Including configuration file 'file:///C:/Users/iskan/AppData/Roaming/npm/node_modules/@autorest/core/dist/resources/plugin-go.md'
VERBOSE [0.98 s]: > Including configuration file 'file:///C:/Users/iskan/AppData/Roaming/npm/node_modules/@autorest/core/dist/resources/plugin-java.md'
VERBOSE [1 s]: > Including configuration file 'file:///C:/Users/iskan/AppData/Roaming/npm/node_modules/@autorest/core/dist/resources/plugin-nodejs.md'
VERBOSE [1.02 s]: > Including configuration file 'file:///C:/Users/iskan/AppData/Roaming/npm/node_modules/@autorest/core/dist/resources/plugin-php.md'
VERBOSE [1.04 s]: > Including configuration file 'file:///C:/Users/iskan/AppData/Roaming/npm/node_modules/@autorest/core/dist/resources/plugin-python.md'
VERBOSE [1.06 s]: > Including configuration file 'file:///C:/Users/iskan/AppData/Roaming/npm/node_modules/@autorest/core/dist/resources/plugin-ruby.md'
VERBOSE [1.09 s]: > Including configuration file 'file:///C:/Users/iskan/AppData/Roaming/npm/node_modules/@autorest/core/dist/resources/plugin-typescript.md'
VERBOSE [1.11 s]: > Including configuration file 'file:///C:/Users/iskan/AppData/Roaming/npm/node_modules/@autorest/core/dist/resources/plugin-validators.md'
VERBOSE [1.14 s]: > Including configuration file 'file:///C:/Users/iskan/AppData/Roaming/npm/node_modules/@autorest/core/dist/resources/plugin-az.md'
VERBOSE [1.16 s]: > Including configuration file 'file:///C:/Users/iskan/AppData/Roaming/npm/node_modules/@autorest/core/dist/resources/plugin-terraform.md'
VERBOSE [1.19 s]: > Including configuration file 'file:///C:/Users/iskan/AppData/Roaming/npm/node_modules/@autorest/core/dist/resources/plugin-azure-functions.md'
VERBOSE [1.22 s]: > Including configuration file 'file:///C:/Users/iskan/AppData/Roaming/npm/node_modules/@autorest/core/dist/resources/graphs.md'
VERBOSE [1.25 s]: > Including configuration file 'file:///C:/Users/iskan/AppData/Roaming/npm/node_modules/@autorest/core/dist/resources/help-configuration.md'
azure:@azure-tools/extension:error Error resolving package C:\Users\iskan\.autorest\@autorest_core@3.2.4\node_modules\@autorest\core [OperationalError: ENOENT: no such file or directory, open 'C:\Users\iskan\.autorest\@autorest_core@3.2.4\node_modules\@autorest\core\package.json'] {
  cause: [Error: ENOENT: no such file or directory, open 'C:\Users\iskan\.autorest\@autorest_core@3.2.4\node_modules\@autorest\core\package.json'] {
    errno: -4058,
    code: 'ENOENT',
    syscall: 'open',
    path: 'C:\\Users\\iskan\\.autorest\\@autorest_core@3.2.4\\node_modules\\@autorest\\core\\package.json'
  },
  isOperational: true,
  errno: -4058,
  code: 'ENOPACKAGEJSON',
  syscall: 'open',
  path: 'C:\\Users\\iskan\\.autorest\\@autorest_core@3.2.4\\node_modules\\@autorest\\core\\package.json'
}
azure:@azure-tools/extension:error Error resolving package C:\Users\iskan\.autorest\@autorest_csharp@3.0.0-beta.20210402.1\node_modules\@autorest\csharp [OperationalError: ENOENT: no such file or directory, open 'C:\Users\iskan\.autorest\@autorest_csharp@3.0.0-beta.20210402.1\node_modules\@autorest\csharp\package.json'] {
  cause: [Error: ENOENT: no such file or directory, open 'C:\Users\iskan\.autorest\@autorest_csharp@3.0.0-beta.20210402.1\node_modules\@autorest\csharp\package.json'] {
    errno: -4058,
    code: 'ENOENT',
    syscall: 'open',
    path: 'C:\\Users\\iskan\\.autorest\\@autorest_csharp@3.0.0-beta.20210402.1\\node_modules\\@autorest\\csharp\\package.json'
  },
  isOperational: true,
  errno: -4058,
  code: 'ENOPACKAGEJSON',
  syscall: 'open',
  path: 'C:\\Users\\iskan\\.autorest\\@autorest_csharp@3.0.0-beta.20210402.1\\node_modules\\@autorest\\csharp\\package.json'
}
INFORMATION: > Installing AutoRest extension '@autorest/csharp' (latest)
INFORMATION: > Installed AutoRest extension '@autorest/csharp' (latest->3.0.0-beta.20210402.1)
FATAL: Failed to install extension '@autorest/csharp' (latest)
  Error: ENOENT: no such file or directory, scandir 'C:\Users\iskan\.autorest\@autorest_csharp@3.0.0-beta.20210402.1\node_modules\@autorest\csharp'

I just don’t know how to move on from here I’d appreciate any suggestions

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
timotheeguerincommented, Apr 5, 2021

Sweet, yeah --azure-validator is mosty for Arm libraries and this is a data-plane so they wouldn’t necessarily be following the same rules

1reaction
iskandersierracommented, Apr 5, 2021

Done!

After all your suggestions (mainly removing the package.json file above %USERPROFILE%/.autorest), I followed instructions here and it worked as expected:

❯ autorest

WARNING: AutoRest has not been tested with Node versions greater than v14.

AutoRest code generation utility [cli version: 3.1.4; node: v15.12.0, max-memory: 4096 MB]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
   Loading AutoRest core      'C:\Users\iskan\AppData\Roaming\npm\node_modules\@autorest\core\dist' (3.2.4)
[3.79 s] Generation Complete
❯ ls .\generated\

    Directory: C:\Users\iskan\source\repos\GitHub\azure-rest-api-specs\specification\timeseriesinsights\data-plane\generated

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d----            4/5/2021 11:32 PM                Models
-a---            4/5/2021 11:45 PM          10652 ModelSettingsRestClient.cs
-a---            4/5/2021 11:45 PM          19096 QueryRestClient.cs
-a---            4/5/2021 11:45 PM          11548 TimeSeriesHierarchiesRestClient.cs
-a---            4/5/2021 11:45 PM          22047 TimeSeriesInstancesRestClient.cs
-a---            4/5/2021 11:45 PM          11318 TimeSeriesTypesRestClient.cs

So we can close this issue. Thanks a lot for your time!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Time Series Insights Reference Data Set - 401 Unauthorized
I was looking at adding Terraform support for Time Series Insights Reference Dataset but any api call to that service just results in:...
Read more >
Azure IoT Time Series Insights client library for .NET
This library provides access to the Azure Time Series Insights service. Source code. Getting started. The complete Microsoft Azure SDK can be downloaded...
Read more >
Time Series Insights API 'aggregates' is not supported for ...
Hi,. I have a web application where I try to visualize the data I have in my Time Series Insights environment in a...
Read more >
Troubleshooting SDK load failure for JavaScript web apps
Simplistically, your end users' client (browser) was unable to download the Application Insights SDK, or initialize from the identified ...
Read more >
Time Series Insights Gen2 migration to Azure Data Explorer
Rewrite queries in KQL. Use Kusto SDKs instead of TSI ones. Migrating Telemetry. Use PT=Time folder in the storage account to retrieve the...
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