Skip to content

Error in running the typescript example #259

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

Open
fretchen opened this issue Apr 30, 2025 · 1 comment
Open

Error in running the typescript example #259

fretchen opened this issue Apr 30, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@fretchen
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

What did you do?

I tried to deploy the example on typescript. As I tried to run the tsccommand (following the instructions in the readme), I had the error:

Cannot find module '@scaleway/serverless-functions/framework/dist/types/types' or its corresponding type declarations.

5 } from "@scaleway/serverless-functions/framework/dist/types/types";

What did you expect to see?

A compiled handler.js

What did you see instead?

What version of Node are you using (node --version)?

$ node --version

v22.9.0

Does this issue reproduce with the latest release?

Yes.

@fretchen fretchen added the bug Something isn't working label Apr 30, 2025
@fretchen
Copy link
Author

fretchen commented May 2, 2025

The solution is to replace the import.

It currently reads:

import {
  Callback,
  Context,
  Event,
} from "@scaleway/serverless-functions/framework/dist/types/types";

This must be replaced with:

import {
  Callback,
  Context,
  Event,
} from "@scaleway/serverless-functions/framework/types/types";

So it would seem that the types directory has been moved around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant