help
help copied to clipboard
Having trouble setting up my Mocha testing environment using node.js framework with M1 chip for iOS
Details
So every time I open VSC and try to run yarn, the version of node is node -v = 18.3.0
I'm not super good at understanding bash or the iOS FS, but this is the work around that fixes my nvm and presents me with the correct version I need so I can use node use 14.15.1
Workaround
export NVM_DIR="$HOME/.nvm"
[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && . "/opt/homebrew/opt/nvm/nvm.sh"
[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && . "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm"
I assume this is a pathing issue when I installed nvm/npm. I'm trying to document this for my team so they don't run into this issue in the future. If there is anything else I can share please let me know.
This is what I get when opening VSC
Node.js version
Node -v = 14.15.1
Example code
No response
Operating system
iOS M1 mini mac
Scope
Having trouble with running yarn tests at runtime
Module and version
Not applicable.