Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@nrwl/workspace:move errors with libs using --importPath #3476

Closed
llwt opened this issue Aug 5, 2020 · 1 comment · Fixed by #3712
Closed

@nrwl/workspace:move errors with libs using --importPath #3476

llwt opened this issue Aug 5, 2020 · 1 comment · Fixed by #3712

Comments

@llwt
Copy link
Contributor

llwt commented Aug 5, 2020

Current Behavior

Ref: #2840 (comment)
cc: @juristr

The --importPath option works great and we were able to remove our custom impl from our schematics.

@nrwl/workspace:move however still errors with Cannot read property 'map' of undefined when run on a module that was generated using that flag.

Our custom schematic temporarily updates the tsconfig to the directory path before moving, then reverts it:

export default function (schema: Schema): Rule {
  return chain([
    revertPathInTsConfig(schema),
    moveWorkspace(schema),
    updateRootTsConfig(schema),
  ]);
}

Expected Behavior

The workspce:move and workspace:delete schematics should work on libraries created using the --importPath flag.

Steps to Reproduce

  • Create a lib using --importPath
  • Attempt to move or delete said library using the @nrwl/workspace:[move|delete] schematic.

Failure Logs

Screen Shot 2020-08-05 at 16 14 19

Environment


>  NX  Report complete - copy this into the issue template

  @nrwl/angular : Not Found
  @nrwl/cli : 10.0.1
  @nrwl/cypress : 10.0.1
  @nrwl/eslint-plugin-nx : 10.0.1
  @nrwl/express : Not Found
  @nrwl/jest : 10.0.1
  @nrwl/linter : 10.0.1
  @nrwl/nest : Not Found
  @nrwl/next : 10.0.1
  @nrwl/node : 10.0.1
  @nrwl/react : 10.0.1
  @nrwl/schematics : Not Found
  @nrwl/tao : 10.0.1
  @nrwl/web : 10.0.1
  @nrwl/workspace : 10.0.1
  typescript : 3.9.7

@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants