TS2664

error TS2664: Invalid module name in augmentation, module ‘gas-local‘ cannot be found.

Broken Code ❌

main.ts
1
declare module "gas-local";

Fixed Code ✔️

The problem occurs when you want to write a module augmentation for a package that isn’t found in your “node_modules” directory. Make sure to install the module:

1
npm install gas-local --save