Skip to content

gts does not work in a yarn workspaces monorepo #490

@darkbasic

Description

@darkbasic
$ yarn run clean
yarn run v1.22.4
$ gts clean
Error: /home/niko/WebstormProjects/beach/beach-monorepo/packages/server/tsconfig.json Not Found
    at getBase (/home/niko/WebstormProjects/beach/beach-monorepo/node_modules/gts/build/src/util.js:66:15)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
$ yarn run check
yarn run v1.22.4
$ gts check "src/**/*.ts"
internal/modules/cjs/loader.js:955
  throw err;
  ^

Error: Cannot find module '/home/niko/WebstormProjects/beach/beach-monorepo/packages/server/node_modules/eslint/bin/eslint'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:952:15)
    at Function.Module._load (internal/modules/cjs/loader.js:835:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

In order to make it work you have to nohoist both gts and eslint.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions