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

Deps are not resolved correctly when server runs in npm workspace #1970

Open
gidra5 opened this issue Jun 4, 2024 · 2 comments
Open

Deps are not resolved correctly when server runs in npm workspace #1970

gidra5 opened this issue Jun 4, 2024 · 2 comments
Labels

Comments

@gidra5
Copy link

gidra5 commented Jun 4, 2024

Impress and Node.js versions

3.0.15 and v18.12.1

Platform

Linux RomanNotebook 5.15.133.1-microsoft-standard-WSL2 #1 SMP Thu Oct 5 21:02:42 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Describe the bug

When creating monorepo using npm workspaces all deps are installed into node_modules folder at the root of workspace.
But impress resolves dependencies relative to package root only, so it can't find anything

To Reproduce

mkdir test
cd test
git clone [email protected]:metarhia/Example.git
echo "{  "name": "my-workspaces-powered-project",  "workspaces": ["Example" ] }" > package.json
cd Example
npm i
npm start

observe error as on the screenshot - metautil is not loaded because resolved incorrectly and breaks startup

Expected behavior

should resolve dependencies relative to workspace root if inside npm workspace

Screenshots

image

Additional context

No response

@gidra5 gidra5 added the bug label Jun 4, 2024
@rgbabaev
Copy link

As a temporary solution you can install impress with --install-strategy=nested

Details:
install-strategy

@rgbabaev
Copy link

I have started a fix for the issue, but I'm not sure if I'm on right way:
rgbabaev@bf4b362

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants