Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Track2] Generated codes by latest codegen compile failed #1066

Closed
dw511214992 opened this issue Jun 24, 2021 · 7 comments
Closed

[Track2] Generated codes by latest codegen compile failed #1066

dw511214992 opened this issue Jun 24, 2021 · 7 comments
Assignees
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. v6
Milestone

Comments

@dw511214992
Copy link
Member

dw511214992 commented Jun 24, 2021

generated codes: https://github.com/Azure/azure-sdk-for-js/tree/5e3b6d37d570ba71a421c28de58b60a639f3c34e/sdk/iotspaces/arm-iotspaces
command:

rush update
node common/scripts/install-run-rush.js build --from @azure/arm-iotspaces --verbose -p max

Compile Error:

Invoking: tsc && rollup -c rollup.config.js && npm run minify && mkdirp ./review &&  npm run extract-api

src/ioTSpacesClient.ts(1,27): error TS2307: Cannot find module '@azure/core-auth' or its corresponding type declarations.
src/ioTSpacesClientContext.ts(2,27): error TS2307: Cannot find module '@azure/core-auth' or its corresponding type declarations.
src/lro/operation.ts(4,33): error TS2307: Cannot find module '@azure/abort-controller' or its corresponding type declarations.
@dw511214992
Copy link
Member Author

cc @ramya-rao-a @sarangan12

@sarangan12 sarangan12 self-assigned this Jun 24, 2021
@sarangan12 sarangan12 added this to the [2021] July milestone Jun 24, 2021
@sarangan12
Copy link
Member

@dw511214992 I am investigating this issue. I will get back to you shortly

@ramya-rao-a
Copy link
Contributor

@sarangan12 In case you are updating the dev dependencies as part of this issue, also include updating @types/node to ^12.0.0 as we are moving away from Node.js 8 support. I am doing this change in the azure-sdk-for-js repo as par tof Azure/azure-sdk-for-js#15996

@sarangan12
Copy link
Member

@dw511214992 There is an issue with packagefilegenerator code that does not include the core-auth package in the package.json file. I will get the fix in and include it on Tuesday's release.

One thing that was surprising for me in your code. I am checking the link here: https://github.com/Azure/azure-sdk-for-js/tree/5e3b6d37d570ba71a421c28de58b60a639f3c34e/sdk/iotspaces/arm-iotspaces Here, there is no lro folder under src folder. (Which is correct and as expected)

But, your error message (in the first comment above), I see the following line:

src/lro/operation.ts(4,33): error TS2307: Cannot find module '@azure/abort-controller' or its corresponding type declarations.

Where is this line coming from?

For your reference, I generated the package using the following command:

autorest --typescript --input-file=https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/iotspaces/resource-manager/Microsoft.IoTSpaces/preview/2017-10-01-preview/iotspaces.json --azure-arm=true --package-name=@azure/arm-iotspaces --generate-metadata=true --clear-output-folder=true --output-folder=C:\Users\sarajama\Projects\azure-sdk-for-js\sdk\iotspaces\arm-iotspaces

@sarangan12 sarangan12 added bug This issue requires a change to an existing behavior in the product in order to be resolved. v6 labels Jun 26, 2021
@dw511214992
Copy link
Member Author

sorry @sarangan12 It seems I give you a wrong link and the correct one is: https://github.com/Azure/azure-sdk-for-js/tree/ea962e606c59ee8b075fe5abf971b84dcdf4ad39/sdk/iotspaces/arm-iotspaces.
If you want to reproduce it you local, you need to revert your azure-rest-api-specs to commit id f7535f8211b7fe9a8d5e5ebdc09830677b55285c because the swaggers in iotspaces are deleted.

@sarangan12
Copy link
Member

@dw511214992 Thanks for the link. But, still if I have to reproduce it locally by regeneration, I do not get the lro folder. (And I do not see any lro op in swagger). So, can you tell me how you regenerated this? (Irrespective of that my fix will cover the scenario. But, I just wanted to make sure of the process)

@sarangan12
Copy link
Member

Code complete with PR #1082

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. v6
Projects
None yet
Development

No branches or pull requests

3 participants