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
Cannot find name 'DedicatedGatewayRequestOptions' #22003
Comments
In My package.json : {
"name": "...",
"version": "1.0.0",
"description": "",
"scripts": {
"build": "tsc",
"watch": "tsc -w",
"prestart": "npm run build",
"start": "func start",
"test": "echo \"No tests yet...\""
},
"dependencies": {
"@azure/cosmos": "^3.16.0"
},
"devDependencies": {
"@azure/functions": "^3.0.0",
"@types/node": "^12.0.0",
"typescript": "^4.0.0"
}
} |
@jay-most To resolve this I think you need to configure More info here: |
@xirzec Is there a workaround ? Downgrading the version or an action I can do on my side ? And if no workaround exists, do you have an idea of how long it will take to have a fixed release ? I don't want to urge you, of course! But it prevents my team and I from developing our project for the french elections on Azure. If no workaround is found we will have to migrate to another cloud service. |
Let me take a look. @raskyer |
@raskyer As a quick workaround until we can get a fix released, you can enable the Another option, if you want to keep lib checking enabled, is to declare the missing type in your project (such as in the index or entry-point file): declare module "@azure/cosmos" {
interface DedicatedGatewayRequestOptions {}
} This will create an ambient definition for the interface in your project that will safely merge with the real definition once a fix is released (at which point you can just remove it). @joheredi @xirzec for FYI. Not sure I agree with using |
Yeah, I agree this one is a bit odd due to the fact a stable interface depends on it. I think this will be a good case study as we figure out the guidelines for beta APIs. |
@raskyer We have published the fix in |
Describe the bug
I am trying to use @azure/cosmos inside an Azure Function written in typescript.
When I try to
npm run build
, the build fails with :node_modules/@azure/cosmos/dist/types/latest/cosmos.d.ts:1365:78 - error TS2304: Cannot find name 'DedicatedGatewayRequestOptions'.
at the stage oftsc
.To Reproduce
Steps to reproduce the behavior:
Expected behavior
Be able to run the function without tsc bug.
Additional context
I try to run the function locally, using Visual Studio Code, but I guess it will happen on terminal or in remote too.
The text was updated successfully, but these errors were encountered: