impress icon indicating copy to clipboard operation
impress copied to clipboard

Deps are not resolved correctly when server runs in npm workspace

Open gidra5 opened this issue 8 months ago • 2 comments

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 avatar Jun 04 '24 14:06 gidra5