Skip to content

Getting build issue if we give npm run build #115

Closed

Description

@deepikaarava
> ISC-MPM-db-sys-services@1.0.0 build
> tsc -p tsconfig.json

node_modules/@databricks/sql/dist/contracts/IDBSQLSession.d.ts:1:23 - error TS2688: Cannot find type definition file for 'node-int64'.

1 /// <reference types="node-int64" />
                        ~~~~~~~~~~

node_modules/@databricks/sql/dist/DBSQLClient.d.ts:3:8 - error TS1192: Module '"C:/MPM/MPM1/isc-mpm-db-sys-services/src/production/ISC-MPM-db-sys-services/node_modules/@databricks/sql/thrift/TCLIService"' has no default export.

3 import TCLIService from '../thrift/TCLIService';
         ~~~~~~~~~~~

node_modules/@databricks/sql/dist/DBSQLLogger.d.ts:1:8 - error TS1259: Module '"C:/MPM/MPM1/isc-mpm-db-sys-services/src/production/ISC-MPM-db-sys-services/node_modules/winston/index"' can only be default-imported using the 'esModuleInterop' flag

1 import winston, { Logger } from 'winston';
         ~~~~~~~

  node_modules/winston/index.d.ts:219:1
    219 export = winston;
        ~~~~~~~~~~~~~~~~~
    This module is declared with 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@databricks/sql/dist/dto/InfoValue.d.ts:2:23 - error TS2688: Cannot find type definition file for 'node-int64'.

2 /// <reference types="node-int64" />
                        ~~~~~~~~~~

node_modules/@databricks/sql/dist/hive/HiveDriver.d.ts:1:8 - error TS1192: Module '"C:/MPM/MPM1/isc-mpm-db-sys-services/src/production/ISC-MPM-db-sys-services/node_modules/@databricks/sql/thrift/TCLIService"' has no default export.

1 import TCLIService from '../../thrift/TCLIService';
         ~~~~~~~~~~~

node_modules/@databricks/sql/dist/index.d.ts:2:8 - error TS1192: Module '"C:/MPM/MPM1/isc-mpm-db-sys-services/src/production/ISC-MPM-db-sys-services/node_modules/@databricks/sql/thrift/TCLIService"' has no default export.

2 import TCLIService from '../thrift/TCLIService';

Activity

  1. kravets-levko commented on Feb 13, 2023

    @kravets-levko
    Contributor

    Hi @deepikaarava! Can you please share your tsconfig.json file as well? Also, please make sure that you don't try to compile files from node_modules

  2. deepikaarava commented on Feb 14, 2023

    @deepikaarava
    Author
    {
      "compilerOptions": {
        "module": "commonjs",
        "declaration": true,
        "removeComments": true,
        "emitDecoratorMetadata": true,
        "experimentalDecorators": true,
        "noUnusedLocals": true,
        "target": "es6",
        "sourceMap": true,
        "outDir": "./dist",
        "baseUrl": "./"
      },
      "exclude": ["node_modules", "dist"]
    }
  3. kravets-levko commented on Feb 14, 2023

    @kravets-levko
    Contributor

    One more question: how do you run tsc command exactly?

  4. kravets-levko commented on Sep 8, 2023

    @kravets-levko
    Contributor

    Hi @deepikaarava! Have you managed to figure this issue out yourself? Please let me know if you still need a help, or I'll close this issue as stale

  5. jm-lovelace commented on Apr 22, 2024

    @jm-lovelace

    I'm getting this same issue. Trying to use this package in an Azure Functions TypeScript app.

  6. J-Bradlee commented on Aug 21, 2024

    @J-Bradlee

    I had a similar issue and was able to fix it by adding "esModuleInterop": true, into the tsconfig.json under compiler options:

    {
      "compilerOptions": {
             "esModuleInterop": true,
         }
    
    
  7. added 2 commits that reference this issue on Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions