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

In apollo-server-azure-functions, getting a typescript error 'Cannot find module './azureFunctions' when compiling. #2085

Closed
andrejpk opened this issue Dec 11, 2018 · 3 comments
Labels
🧬 typings Relates to TypeScript changes or improvements.

Comments

@andrejpk
Copy link
Contributor

It looks like there's a dependency to an Azure Functions type declaration (src/azureFunctions.d.ts) that's specific to this project but when compiled, that d.ts isn't being put into the dist/ folder so I'm getting an error compiling my project. It still seems to work but I want to get rid of this error.

Here's my demo code: https://github.com/GLRAzure/apollo-graphql-azfunctions-ts-demo

Maybe I missed something in the installation.. there may be something we can add to tsconfig in the Apollo project to have tsc copy this d.ts into the dist folder.

@mhabegger
Copy link

It seems, azureFunctions is located in the src folder and does not get compiled on build.

Manually editing azureFunctionApollo.d.ts to check and importing from ../src/... make's it work as a temporary workaround.

import { HttpContext, FunctionRequest, FunctionResponse } from '../src/azureFunctions';

@abernix abernix added the 🧬 typings Relates to TypeScript changes or improvements. label Dec 13, 2018
@andrejpk
Copy link
Contributor Author

I played around with it.. if we just rename the azureFunctions.d.ts -> azureFunctions.ts, the compiler will build a d.ts in the output folder. I can make a pull request for this if it would help.

jmshal added a commit to jmshal/apollo-server that referenced this issue Feb 8, 2019
abernix pushed a commit that referenced this issue Feb 12, 2019
* Rename azureFunctions.d.ts to azureFunctions.ts

See #2085 (comment)

* Update CHANGELOG.md
@jmshal
Copy link
Contributor

jmshal commented Feb 13, 2019

Can be closed now. Fixed in v2.4.1.

@benjamn benjamn closed this as completed Feb 13, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🧬 typings Relates to TypeScript changes or improvements.
Projects
None yet
Development

No branches or pull requests

5 participants