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

create-nx-workspace fails with "Cannot find module 'typescript'" (node-standalone / nest) #17279

Closed
1 of 4 tasks
Ionaru opened this issue May 28, 2023 · 3 comments
Closed
1 of 4 tasks
Labels
outdated scope: node Issues related to Node, Express, NestJS support for Nx type: bug

Comments

@Ionaru
Copy link

Ionaru commented May 28, 2023

Current Behavior

Command errors with the message:

>  NX   Failed to create a workspace.

   Exit code: 1
   Log file: C:\Users\Name\AppData\Local\Temp\tmp-42620-ErVKfEEqbSQe\error.log

Log file contents posted below.

Expected Behavior

Command succeeds and creates the chosen workspace.

GitHub Repo

N/A

Steps to Reproduce

  1. Run npx create-nx-workspace@latest new-workspace --nxCloud false --preset node-standalone --framework nest --docker false

Nx Report

N/A

Failure Logs

added 482 packages, and audited 483 packages in 19s

44 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

>  NX  Generating @nx/workspace:preset

Fetching @nx/nest...

 >  NX   Cannot find module 'typescript'

   Require stack:
   - C:\Users\Name\AppData\Local\Temp\tmp-32216-nFrllqhn3FEH\node_modules\@nx\nest\src\generators\library\lib\add-exports-to-barrel.js
   - C:\Users\Name\AppData\Local\Temp\tmp-32216-nFrllqhn3FEH\node_modules\@nx\nest\src\generators\library\lib\index.js
   - C:\Users\Name\AppData\Local\Temp\tmp-32216-nFrllqhn3FEH\node_modules\@nx\nest\src\generators\library\library.js
   - C:\Users\Name\AppData\Local\Temp\tmp-32216-nFrllqhn3FEH\node_modules\@nx\nest\index.js
   - C:\Users\Name\Projects\new-workspace\node_modules\@nx\devkit\src\utils\package-json.js
   - C:\Users\Name\Projects\new-workspace\node_modules\@nx\devkit\src\generators\to-js.js
   - C:\Users\Name\Projects\new-workspace\node_modules\@nx\devkit\public-api.js
   - C:\Users\Name\Projects\new-workspace\node_modules\@nx\devkit\index.js
   - C:\Users\Name\Projects\new-workspace\node_modules\@nx\workspace\src\generators\preset\preset.js
   - C:\Users\Name\Projects\new-workspace\node_modules\nx\src\config\workspaces.js
   - C:\Users\Name\Projects\new-workspace\node_modules\nx\src\config\configuration.js
   - C:\Users\Name\Projects\new-workspace\node_modules\nx\src\utils\package-manager.js
   - C:\Users\Name\Projects\new-workspace\node_modules\nx\bin\init-local.js
   - C:\Users\Name\Projects\new-workspace\node_modules\nx\bin\nx.js
   Pass --verbose to see the stacktrace.


 >  NX   Workspace creation failed, see above.

   Pass --verbose to see the stacktrace.

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

@artyomkhomyakov
Copy link

I confirm. The same for me. OS: MacOS 12.0.1 (m1). Node: v18.16.0, NPM: 9.6.7.

@leosvelperez leosvelperez added the scope: node Issues related to Node, Express, NestJS support for Nx label May 29, 2023
@leosvelperez
Copy link
Member

Fixed by #17320.

@github-actions
Copy link

github-actions bot commented Jul 1, 2023

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 Jul 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated scope: node Issues related to Node, Express, NestJS support for Nx type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants