Permission denied

Hye guys. im new to WSL2 and nixshell and currently facing a problem accessing permission. Im really appreciates it if anyone would like to help me clarifying with this error.

the error goes:

[nix-shell:/mnt/c/Users/User/projects/developer-exercises/1.basic/0.zome-functions/exercise/tests]$ npm install && npm run build
npm WARN demo-1@0.0.0 No description
npm WARN demo-1@0.0.0 No repository field.

audited 179 packages in 2.219s

41 packages are looking for funding
run npm fund for details

found 1 high severity vulnerability
run npm audit fix to fix them, or npm audit for details

demo-1@0.0.0 build /mnt/c/Users/User/projects/developer-exercises/1.basic/0.zome-functions/exercise/tests
cd … && CARGO_TARGET_DIR=target cargo build --release --target wasm32-unknown-unknown

Updating crates.io index

warning: spurious network error (2 tries remaining): failed to mmap. Could not write data: Permission denied; class=Os (2)
warning: spurious network error (1 tries remaining): failed to mmap. Could not write data: Permission denied; class=Os (2)
error: failed to get chrono as a dependency of package exercise v0.0.1 (/mnt/c/Users/User/projects/developer-exercises/1.basic/0.zome-functions/exercise/zomes/exercise)
Caused by:
failed to fetch https://github.com/rust-lang/crates.io-index

Caused by:
failed to mmap. Could not write data: Permission denied; class=Os (2)
npm ERR! code ELIFECYCLE
npm ERR! errno 101
npm ERR! demo-1@0.0.0 build: cd .. && CARGO_TARGET_DIR=target cargo build --release --target wasm32-unknown-unknown
npm ERR! Exit status 101
npm ERR!
npm ERR! Failed at the demo-1@0.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/najidnadri/.npm/_logs/2021-07-17T06_12_47_377Z-debug.log

solution has been found. just run the command directly in the ubuntu and not from VS code or any third party app.

I too have to often use the WSL2’s Ubuntu (bash) shell just for hc commands, because apparently, nix-shell . yields a command not found when invoked from inside my IDE’s terminal (nix-* not in PATH after install · Issue #3317 · NixOS/nix · GitHub); the IDE being CLion running inside a Desktop Environment inside WSL2… It really sucks having to leave the IDE’s terminal and switch to the WSL2’s Ubuntu shell just to be able to use nix… It doesn’t bother much, but just in case someone here has a workaround, please let me know… [Also, me too am a noob with regard to nix, etc, and often struggle in vain at tasks that need not be struggled with…]