Stacks Forum

Stacks.js error TS1259 after npm install @stacks/network

Posted here

I am getting this error after tsc compiling after npm install @stacks/network errorTS1259: Module ‘“C:/Users/philk/demos/projects/helloworld/node_modules/@types/bn.js/index”’ can only be default-imported using the ‘esModuleInterop’ flag

3 import BN from ‘bn.js’;
~~

node_modules/@types/bn.js/index.d.ts:586:1
586 export = BN;
~~~~~~~~~~~~
This module is declared with using ‘export =’, and can only be used with a default import when using the ‘esModuleInterop’ flag.