Skip to content

How to build (macOS)

Nickolas edited this page Jun 7, 2017 · 2 revisions

dependencies

  • osx 10.12 or higher version is tested.
  • node version v6.7.0
  • npm version 3.10.3
  • nvm version 0.33.1

We recommend using nvm to manage node version.

build

1 install npm dependencies

npm install

2 install package script dependencies

cd script && npm install && cd ..

3 checkout apm and install

mkdir apm/node_modules
cd apm/node_modules && git clone https:/TheraPackages/apm.git atom-package-manager && cd atom-package-manager && npm install

4 build thera and install to application

script/build --install

In china you can use cnpm install && script/build --install instead
if there is still error, plz check our travis-ci config and travis_before_script.

FAQ

iojs-v1.3.13.tar.gz stores on amazon S3. Use a vpn to download it.
If you use shadowsocks you can follow this to setup your terminal.

2 After build complete, run thera goes error. module version mismatch Expected 49, got 48.

version mismatch
npm native module version mismatch with electron. Rebuild it with npm rebuild --runtime=electron --target=1.3.15 --disturl=https://atom.io/download/atom-shell --abi=49 and build again.

The target version matches the version of electron, which is defined in project root package.json file.

3 apm/node_modules/atom-package-manager/script/postinstall.sh: Permission denied when apm install.

Sometimes apm does not have the permission to execute. chmod +x apm/node_modules/atom-package-manager/bin can fix this issue.

4 Error: ENFILE: file table overflow

Thera opens lots of files when building, sometimes exceed the limit of system max files. We can change the system limit.

Run these in terminal:

echo kern.maxfiles=65536 | sudo tee -a /etc/sysctl.conf echo kern.maxfilesperproc=65536 | sudo tee -a /etc/sysctl.conf sudo sysctl -w kern.maxfiles=65536 sudo sysctl -w kern.maxfilesperproc=65536 ulimit -n 65536 65536
Add this to ~/.bash_profile

ulimit -n 65536 65536

Source:
https:/karma-runner/karma/issues/1979#issuecomment-217994084