error TS2665: Invalid module name in augmentation. Module ‘gas-local‘ resolves to an untyped module at ‘../node_modules/gas-local/index.js‘, which cannot be augmented.
Broken Code ❌
main.ts
1 2 3 4
declaremodule"gas-local"; import gas from'gas-local';
const glib = gas.require('./src');
Fixed Code ✔️
You have to move the shorthand ambient module declaration from a “.ts” file into a “.d.ts” file: