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 as v10.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
This requires an Apple Silicon Mac (M1, M2, etc)
Pull the test branch
Make sure the the integrated terminal isn't already open by clicking the TRASH CAN icon to kill it
Reopen the integrated terminal
Type arch. If it says i386 then it's working
Next, 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
Type nvm version to see what version of node is running. It should be v10.22.0. If it isn't the case then type nvm use.
Type npm ci to reload all the library dependencies set in package-lock.json and see if there are errors.
If no errors, try running netcreate in the usual way and make sure it works.
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 run npm use && npm ci when starting it up for the first time in a terminal window:
# see current architecture
arch # says arm64
# run a new shell as an emulated intel processor
arch -arch x86_64 /bin/zsh
arch # now says i386
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
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.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: