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

"ERROR in × Module not found: Can't resolve" #28951

Open
1 of 4 tasks
Niewdanka opened this issue Nov 15, 2024 · 2 comments
Open
1 of 4 tasks

"ERROR in × Module not found: Can't resolve" #28951

Niewdanka opened this issue Nov 15, 2024 · 2 comments
Assignees

Comments

@Niewdanka
Copy link

Niewdanka commented Nov 15, 2024

Current Behavior

Hi! After upgrading Nx from version 20.0.12 to 20.1.0, I am getting the following error:
"ERROR in × Module not found: Can't resolve '/app/apps/test/src/main.ts' in '/app/apps/test'"

This happens when I try to build a Docker image and use nx build inside the Dockerfile. In previous versions of Nx, I didn’t encounter this error.
When I build the project using the CLI, everything works as expected.

Expected Behavior

I should be able to build docker image.

GitHub Repo

No response

Steps to Reproduce

  1. Craete Dockerfile
WORKDIR /app

COPY package.json pnpm-lock.yaml ./

RUN pnpm install --frozen-lockfile

COPY . .

RUN pnpx nx build test
  1. Build docker image

Nx Report

Node           : 22.4.0
OS             : darwin-arm64
Native Target  : aarch64-macos
pnpm           : 9.13.0

nx (global)        : 20.0.0
nx                 : 20.1.1
@nx/js             : 20.1.1
@nx/jest           : 20.1.1
@nx/eslint         : 20.1.1
@nx/workspace      : 20.1.1
@nx/eslint-plugin  : 20.1.1
@nx/nest           : 20.1.1
@nx/node           : 20.1.1
@nx/rspack         : 20.1.1
@nx/web            : 20.1.1
typescript         : 5.6.3
---------------------------------------
Registered Plugins:
@nx/eslint/plugin
@nx/jest/plugin

Failure Logs

ERROR in × Module not found: Can't resolve '/app/apps/test/src/main.ts' in '/app/apps/test

Package Manager Version

pnpm 9.13.0

Operating System

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

Additional Information

No response

@FrozenPandaz
Copy link
Collaborator

FrozenPandaz commented Jan 28, 2025

Sorry, there is not much information for us to investigate the issue. Can you add a repo with a minmal reproduction please? It would help us debug the issue and address it sooner.

@FrozenPandaz FrozenPandaz added the scope: bundlers Issues related to webpack, rollup label Jan 28, 2025
Copy link

github-actions bot commented Feb 6, 2025

This issue has been automatically marked as stale because no reproduction was provided within 7 days.
Please help us help you. Providing a repository exhibiting the issue helps us diagnose and fix the issue.
Any time that we spend reproducing this issue is time taken away from addressing this issue and other issues.
This issue will be closed in 21 days if a reproduction is not provided.
If a reproduction has been provided, please reply to keep it active.
Thanks for being a part of the Nx community! 🙏

@github-actions github-actions bot added the stale label Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants