DRAFT: Force VSC Integrated Terminal X86_64 Architecture with correct NODE version #273
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
THIS PULL REQUEST SHOULD NOT BE MERGED WITHOUT TESTING ON MULTIPLE PLATFORMS BY MULTIPLE DEVS
The 2018 build of NetCreate uses an older version of node (set in
.nvmrc
asv10.22.0
). This version does not officially support Apple Silicon (e.g. M1, M2 processors), but we don't want to update it yet because there are many packages that also need updating.Why is this important?
Many of the packages in NPM have native code elements that have dependencies to a processor and operating system platform, and they often also tied to the nodejs major version. Many the packages used for NetCreate predate Apple Silicon and may not compile correctly, causing unusual errors.
TESTING ARCHITECTURE
This requires an Apple Silicon Mac (M1, M2, etc)
arch
. If it saysi386
then it's workingNext, make sure NetCreate is using the correct NodeJS architecture. Since the processor type has changed, it's likely that the codebase may need to be repulled.
cd build
nvm version
to see what version of node is running. It should bev10.22.0
. If it isn't the case then typenvm use
.npm ci
to reload all the library dependencies set inpackage-lock.json
and see if there are errors.TESTING NODE VERSION MISMATCH
When the
brunch-server.js
file runs, it now checks that thenode version
output matches what is inside of.nvmrc
and will halt the server with instructions on what to do.TECHNICAL INFORMATION
This patch adds the following settings to
netcreate-2018.code-workspace
The effect of these settings is to define a profile for osx machines "x86 zsh" which will execute the
arch
command that tells Rosetta (apple's Intel processor emulator) to switch to X86_64 mode when opening the integrated terminal inside of Visual Studio Code. The second setting tells VSC to use this new profile for every new one.This does not affect other terminal windows, but you can do the same thing by issuing the
arch
command BEFORE you runnpm use && npm ci
when starting it up for the first time in a terminal window: