twilio / twilio-node

Node.js helper library
MIT License
1.37k stars 497 forks source link

Compiling cluster tests results in an error #926

Closed Hunga1 closed 1 year ago

Hunga1 commented 1 year ago

Issue Summary

Trying to compile the Typescript cluster tests results in an error:

Steps to Reproduce

  1. Change directory into spec/cluster
  2. Run npm i

Exception/Log

test.spec.ts:3:20 - error TS2307: Cannot find module 'twilio' or its corresponding type declarations.

3 import twilio from "twilio";
                     ~~~~~~~~

webhook.spec.ts:1:30 - error TS2307: Cannot find module 'twilio/lib/rest/studio/v2/flow' or its corresponding type declarations.

1 import { FlowInstance } from "twilio/lib/rest/studio/v2/flow";
                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Found 2 errors in 2 files.

Errors  Files
     1  test.spec.ts:3
     1  webhook.spec.ts:1

Technical details:

Hunga1 commented 1 year ago

It turns out the cluster tests are designed to run on the packaged build. Closing this.

https://github.com/twilio/twilio-node/pull/927#discussion_r1138830861