impress
impress copied to clipboard
Deps are not resolved correctly when server runs in npm workspace
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
Additional context
No response