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

Nest js + Expo #23233

Closed
1 of 4 tasks
mrs4z opened this issue May 8, 2024 · 4 comments
Closed
1 of 4 tasks

Nest js + Expo #23233

mrs4z opened this issue May 8, 2024 · 4 comments
Assignees
Labels
outdated scope: node Issues related to Node, Express, NestJS support for Nx scope: react-native Issues relating to React Native type: bug

Comments

@mrs4z
Copy link

mrs4z commented May 8, 2024

Current Behavior

Hi! I have a problem...

The problem is that when I try to link the expo + nest js monorepository, namely when I try to run one of the applications, I get the following error.

Separately everything works great.

Expected Behavior

I expect that all applications will launch without errors.

GitHub Repo

No response

Steps to Reproduce

  1. npx create-nx-workspace --pm yarn
  2. nx add @nx/expo
  3. nx g @nx/expo:app mobile
  4. nx add @nx/nest
  5. nx g @nx/nest:application backend

... and run serve mobile or backend applications..

Nx Report

╰─ nx report                                                                                                                                                                                                                  ─╯

 NX   Failed to process project graph. Run "nx reset" to fix this. Please report the issue if you keep seeing it.

Pass --verbose to see the stacktraces.

Failure Logs

[Failed to process project graph. Run "nx reset" to fix this. Please report the issue if you keep seeing it.
  The "@nx/webpack/plugin" plugin threw an error while creating nodes from apps/mobile/webpack.config.js:
    Error: Cannot find module '@expo/webpack-config'
    Require stack:
    - /Users/mrs4z/projects/self/testowkrspace/apps/mobile/webpack.config.js
    - /Users/mrs4z/projects/self/testowkrspace/node_modules/@nx/webpack/src/utils/webpack/resolve-user-defined-webpack-config.js
    - /Users/mrs4z/projects/self/testowkrspace/node_modules/@nx/webpack/src/plugins/plugin.js
    - /Users/mrs4z/projects/self/testowkrspace/node_modules/@nx/webpack/plugin.js
    - /Users/mrs4z/projects/self/testowkrspace/node_modules/nx/src/project-graph/plugins/loader.js
    - /Users/mrs4z/projects/self/testowkrspace/node_modules/nx/src/project-graph/plugins/internal-api.js
    - /Users/mrs4z/projects/self/testowkrspace/node_modules/nx/src/project-graph/utils/retrieve-workspace-files.js
    - /Users/mrs4z/projects/self/testowkrspace/node_modules/nx/src/project-graph/file-utils.js
    - /Users/mrs4z/projects/self/testowkrspace/node_modules/nx/src/utils/package-manager.js
    - /Users/mrs4z/projects/self/testowkrspace/node_modules/nx/src/devkit-internals.js
    - /Users/mrs4z/projects/self/testowkrspace/node_modules/nx/src/utils/assert-workspace-validity.js
    - /Users/mrs4z/projects/self/testowkrspace/node_modules/nx/src/project-graph/build-project-graph.js
    - /Users/mrs4z/projects/self/testowkrspace/node_modules/nx/src/project-graph/project-graph.js
    - /Users/mrs4z/projects/self/testowkrspace/node_modules/nx/src/utils/project-graph-utils.js
    - /Users/mrs4z/projects/self/testowkrspace/node_modules/nx/src/daemon/server/file-watching/file-watcher-sockets.js
    - /Users/mrs4z/projects/self/testowkrspace/node_modules/nx/src/daemon/server/server.js
    - /Users/mrs4z/projects/self/testowkrspace/node_modules/nx/src/daemon/server/start.js
        at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
        at Module._load (node:internal/modules/cjs/loader:922:27)
        at Module.require (node:internal/modules/cjs/loader:1143:19)
        at require (node:internal/modules/cjs/helpers:119:18)
        at Object.<anonymous> (/Users/mrs4z/projects/self/testowkrspace/apps/mobile/webpack.config.js:1:38)
        at Module._compile (node:internal/modules/cjs/loader:1256:14)
        at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
        at Module.load (node:internal/modules/cjs/loader:1119:32)
        at Module._load (node:internal/modules/cjs/loader:960:12)
        at Module.require (node:internal/modules/cjs/loader:1143:19)
The "@nx/webpack/plugin" plugin threw an error while creating nodes from apps/testowkrspace/webpack.config.js:
    Error: Cannot find module '@expo/webpack-config'
    Require stack:
    - /Users/mrs4z/projects/self/testowkrspace/apps/testowkrspace/webpack.config.js
    - /Users/mrs4z/projects/self/testowkrspace/node_modules/@nx/webpack/src/utils/webpack/resolve-user-defined-webpack-config.js
    - /Users/mrs4z/projects/self/testowkrspace/node_modules/@nx/webpack/src/plugins/plugin.js
    - /Users/mrs4z/projects/self/testowkrspace/node_modules/@nx/webpack/plugin.js
    - /Users/mrs4z/projects/self/testowkrspace/node_modules/nx/src/project-graph/plugins/loader.js
    - /Users/mrs4z/projects/self/testowkrspace/node_modules/nx/src/project-graph/plugins/internal-api.js
    - /Users/mrs4z/projects/self/testowkrspace/node_modules/nx/src/project-graph/utils/retrieve-workspace-files.js
    - /Users/mrs4z/projects/self/testowkrspace/node_modules/nx/src/project-graph/file-utils.js
    - /Users/mrs4z/projects/self/testowkrspace/node_modules/nx/src/utils/package-manager.js
    - /Users/mrs4z/projects/self/testowkrspace/node_modules/nx/src/devkit-internals.js
    - /Users/mrs4z/projects/self/testowkrspace/node_modules/nx/src/utils/assert-workspace-validity.js
    - /Users/mrs4z/projects/self/testowkrspace/node_modules/nx/src/project-graph/build-project-graph.js
    - /Users/mrs4z/projects/self/testowkrspace/node_modules/nx/src/project-graph/project-graph.js
    - /Users/mrs4z/projects/self/testowkrspace/node_modules/nx/src/utils/project-graph-utils.js
    - /Users/mrs4z/projects/self/testowkrspace/node_modules/nx/src/daemon/server/file-watching/file-watcher-sockets.js
    - /Users/mrs4z/projects/self/testowkrspace/node_modules/nx/src/daemon/server/server.js
    - /Users/mrs4z/projects/self/testowkrspace/node_modules/nx/src/daemon/server/start.js
        at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
        at Module._load (node:internal/modules/cjs/loader:922:27)
        at Module.require (node:internal/modules/cjs/loader:1143:19)
        at require (node:internal/modules/cjs/helpers:119:18)
        at Object.<anonymous> (/Users/mrs4z/projects/self/testowkrspace/apps/testowkrspace/webpack.config.js:1:38)
        at Module._compile (node:internal/modules/cjs/loader:1256:14)
        at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
        at Module.load (node:internal/modules/cjs/loader:1119:32)
        at Module._load (node:internal/modules/cjs/loader:960:12)
        at Module.require (node:internal/modules/cjs/loader:1143:19)] {
  name: 'ProjectGraphError'
}

Node.js v18.18.2

Process finished with exit code 1

Package Manager Version

1.22.22

Operating System

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

Additional Information

Maybe it is possible to remove webpack from nest js?

@mrs4z mrs4z added the type: bug label May 8, 2024
@AgentEnder AgentEnder added scope: node Issues related to Node, Express, NestJS support for Nx scope: react-native Issues relating to React Native labels May 10, 2024
@xiongemi
Copy link
Collaborator

xiongemi commented May 14, 2024

@mrs4z the workaround is just to delete webpack.config.js under mobile app, then the you can serve up the mobile and backend app.
i will do a proper fix for this.

@mrs4z
Copy link
Author

mrs4z commented May 14, 2024

@xiongemi I just checked - it works! Thanks for the answer!

xiongemi added a commit that referenced this issue May 31, 2024
config.js

<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #26118
#25291
#23233
@xiongemi
Copy link
Collaborator

fixed in pr #26137

FrozenPandaz pushed a commit that referenced this issue Jun 3, 2024
config.js

<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #26118
#25291
#23233

(cherry picked from commit 2cb7ecb)
Copy link

github-actions bot commented Jul 1, 2024

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, 2024
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 scope: react-native Issues relating to React Native type: bug
Projects
None yet
Development

No branches or pull requests

3 participants