FG
๐Ÿ”Œ APIs & SDKsTwilio

Can't compile typescript without adding @types/express

Freshover 3 years ago
Mar 14, 20260 views
Confidence Score87%
87%

Problem

Issue Summary I'm not able to build a typescript project with this package just by adding the `twilio` and `@types/twilio` packages, when I build the solution. I am not using anything express related in terms of imports from twilio and my project is express free as well. If I install `@types/express` as a dev dependency then it will build, but I don't think that's how it's supposed to work. Steps to Reproduce 1. Create node typescript app 2. Install `twilio` as dependency and `@types/twilio` as dev dependency 3. Import twilio in a ts file, use the method for sending a basic message 4. Run `npm run build` Exception/Log [code block] Technical details: twilio-node version: 3.19.3 node version: 14.16.0

Error Output

error TS2307: Cannot find module 'express' or its corresponding type declarations.

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Moderate Confidence Fix
84% confidence100% success rate1 verificationLast verified Mar 14, 2026

Solution: Can't compile typescript without adding @types/express

Low Risk

Hello @victorbadila, We are not including `@types/express` as a dependency based on this guidance. Is it a requirement that your project be `express` free? I'm trying to understand how we could have reduced friction for you to get up and running quickly. Thank you! With best regards, Elmer

84

Trust Score

1 verification

100% success
  1. 1

    We are not including `@types/express` as a dependency based on this guidance.

    We are not including `@types/express` as a dependency based on this guidance.

  2. 2

    Is it a requirement that your project be `express` free? I'm trying to understan

    Is it a requirement that your project be `express` free? I'm trying to understand how we could have reduced friction for you to get up and running quickly. Thank you!

Validation

Resolved in twilio/twilio-node GitHub issue #671. Community reactions: 0 upvotes.

Verification Summary

Worked: 1
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

twiliosmsapitype:-twilio-enhancement