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

fix(core): include types/node in deps when adding workspace-generator #10388

Merged
merged 1 commit into from May 20, 2022

Conversation

meeroslav
Copy link
Contributor

@meeroslav meeroslav commented May 19, 2022

Omitting @types/node from the dependencies breaks pnpm v7 (and any other package manager with strict transitive rule).

Current Behavior

When generating workspace-generator and running it with pnpm v7 we get the following error:

$ pnpm exec nx workspace-generator my-generator mylib
                                                                                                                                                   
error TS2688: Cannot find type definition file for 'node'.
  The file is in the program because:
    Entry point of type library 'node' specified in compilerOptions

  tools/tsconfig.generated.json:9:7
    9       "node"
            ~~~~~~
    File is entry point of type library specified here.


Found 1 error.

The reason is that @types/node is used in tsconfig.generated.json but it only exists as a transitive dependency. This is not allowed with pnpm v7.

The error can be seen on nightly E2E tests for workspace-generator

Expected Behavior

The default workspace-generator should run without errors in pnpm v7.

Related Issue(s)

Fixes #

@meeroslav meeroslav self-assigned this May 19, 2022
@nx-cloud
Copy link

nx-cloud bot commented May 19, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit fde5178. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 12 targets

Sent with 💌 from NxCloud.

@vercel
Copy link

vercel bot commented May 19, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
nx-dev ✅ Ready (Inspect) Visit Preview May 19, 2022 at 1:29PM (UTC)

@meeroslav meeroslav added the scope: core core nx functionality label May 19, 2022
@meeroslav meeroslav merged commit c17a086 into nrwl:master May 20, 2022
@meeroslav meeroslav deleted the fix/pnpm-workspace-generator branch May 20, 2022 07:52
@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

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

Successfully merging this pull request may close these issues.

None yet

1 participant