Skip to content

Error locating tsconfig.json #113

Open
@jmiller-cvet

Description

@jmiller-cvet

I am creating a component library following the same structure as the Ant Design library and want to use antd-tools in the same way as part of my build process. However, when I execute "npm run compile", I get the following error:

Error: Cannot find module 'C:\projects\component-library\node_modules\C:\projects\component-library\tsconfig.json'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at Module.require (C:\Source\cvet\evolution-ui-components\node_modules\antd-tools\lib\utils\projectHelper.js:32:25)
    at require (internal/modules/cjs/helpers.js:22:18)
    at module.exports (C:\Source\cvet\evolution-ui-components\node_modules\antd-tools\lib\getTSCommonConfig.js:10:10)
    at Object.<anonymous> (C:\Source\cvet\evolution-ui-components\node_modules\antd-tools\lib\gulpfile.js:28:48)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)

The path 'C:\projects\component-library\tsconfig.json' is correct. Any idea what I need to do so the require statement looks for the file in the correct location?

I've forked Ant Design and the same statement works fine and I do not see what is different in our configuration.

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