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.

Latest V15 "Cannot find module koa"

See original GitHub issue

I’m upgrading from V13, followed the guide that demonstrated how to update the import paths. (I would recommend linking the GH issue in the patch notes maybe?)

Info:

  • TypeScript
  • Express
  • Apollo Server

Using the following:

import graphqlUploadExpress from 'graphql-upload/graphqlUploadExpress'
import GraphQLUpload from 'graphql-upload/GraphQLUpload'
import type { FileUpload } from 'graphql-upload/processRequest'

Receiving the error:

../../../node_modules/graphql-upload/graphqlUploadKoa.js(45,21): error TS2307: Cannot find module 'koa' or its corresponding type declarations.

I see the following in graphqlUploadKoa.js, if it helps: Screen Shot 2022-05-28 at 11 46 47 AM

Any recommendations?

Thanks for the package!

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
gkTimcommented, Jun 9, 2022

Would be great to add a section to the readme on how to import it in typescript, since this import style is not so common. So users don’t need to search how to fix it.

I won’t be able to create a PR in the next three weeks but after that I can do it if you want. Do you have a preferred place where to put it into the readme?

1reaction
TurtIeSockscommented, May 29, 2022

Confirmed, thanks @jaydenseric!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Node js + TypeSc + Babel "Error: Cannot find module 'koa'"
1 Answer 1 · Install koa-router typings with npm install --save-dev @types/koa-router . · Set moduleResolution inside tsconfig.json to node . See ......
Read more >
koa - npm
Koa's Request object provides helpful methods for working with http requests which delegate to an IncomingMessage from the node http module.
Read more >
How To Build a "Hello World" Application with Koa
This tutorial was verified with Node v15.14.0, npm v7.10.0, koa ... app = new Koa(); const router = new Router(); router.get('koa-example', ...
Read more >
cannot find module [Node npm Error Solved] - freeCodeCamp
To fix the error, you need to install the package that is absent in your project directory – npm install package-name or yarn...
Read more >
Npm koa
Koa is a new web framework designed by the team behind 22 Mar 2019 Popularity ... of the last 12 months, excluding weekends...
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