nrwl / nx

Smart Monorepos · Fast CI
https://nx.dev
MIT License
23.4k stars 2.33k forks source link

create-nx-workspace does not work in devcontainer #26404

Open spotlesscoder opened 4 months ago

spotlesscoder commented 4 months ago

Current Behavior

I never run npm stuff outside a container for security reasons

I have create a new folder with vscode and put 4 files: .devcontainer/devcontainer.json .devcontainer/docker-compose.yml .devcontainer/Dockerfile .devcontainer/postCreateCommand.sh

Then I opened the folder in dev container mode (microsoft node image with node 20)

Then I ran npx create-nx-workspace Answered the first question (which directory to use) with . because I want my package.json, nx.json etc. in the root of the directory

NX shows error That folder is already taken

Expected Behavior

create-nx-workspace should use the folder I want

GitHub Repo

No response

Steps to Reproduce

see above

Nx Report

NX   Report complete - copy this into the issue template

Node   : 20.2.0
OS     : linux-x64
npm    : 9.6.6

nx (global)        : 19.2.0
nx                 : 19.2.0
@nx/js             : 19.2.0
@nx/jest           : 19.2.0
@nx/linter         : 19.2.0
@nx/eslint         : 19.2.0
@nx/workspace      : 19.2.0
@nx/devkit         : 19.2.0
@nx/eslint-plugin  : 19.2.0
@nx/nest           : 19.2.0
@nx/next           : 19.2.0
@nx/node           : 19.2.0
@nx/playwright     : 19.2.0
@nx/react          : 19.2.0
@nrwl/tao          : 19.2.0
@nx/web            : 19.2.0
@nx/webpack        : 19.2.0
typescript         : 5.4.5
---------------------------------------
Registered Plugins:
@nx/next/plugin
@nx/playwright/plugin
@nx/eslint/plugin
@nx/jest/plugin
@nx/webpack/plugin

Failure Logs

No response

Package Manager Version

npm 9.6.6

Operating System

Additional Information

No response

St1c commented 2 weeks ago

Maybe related to this issue, but I have similar issue where @nx/js versions above 19.4.0 cause live-reloading inside docker not to work. That of course includes dev-containers. Version below 19.4.0 and that one included works just fine.