Skip to content

tools: after nx migration build:local does not work #18675

@layershifter

Description

@layershifter

Repro steps

  • clone chore(make-styles): migrate to new DX #18673 or run yarn nx workspace-generator migrate-converged-pkg --name='@fluentui/make-styles' (in a case of command please modify tsconfig.json as in PR)
  • it will add build:local to packages/make-styles/package.json#scripts
  • try to run yarn workspace @fluentui/make-styles build:local, a command will fail ❌
$ tsc -p . --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output dist/make-styles/src && yarn docs
office-ui-fabric-react\scripts\typescript\normalize-import.js:40
    throw new Error(`${sourceDir} doesn't exist`);
    ^

Error: office-ui-fabric-react\packages\make-styles\dist\make-styles\src doesn't exist
    at main (office-ui-fabric-react\scripts\typescript\normalize-import.js:40:11)
    at Object.<anonymous> (office-ui-fabric-react\scripts\typescript\normalize-import.js:18:1)
  • notice that for other packages, for example react-image it's passing ✅

Looks that it's related to a generated structure after the build command and a fact that @fluentui/make-styles does not have dependencies from a repo that results in different output in /dist:

yarn workspace @fluentui/react-image tsc -p . --module esnext --emitDeclarationOnly

image

yarn workspace @fluentui/make-styles tsc -p . --module esnext --emitDeclarationOnly

image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions