Error: spawnSync when trying to run script/build – building atom from source

I am trying to build Atom from source in Linux Mint 17.3 and I think I am almost there but I keep hitting a new error every time.

I have just run the command: script/build --create-debian-package --compress-artifacts --install --unsafe-perm=true --allow-root --global leveldown.

The output was:

Node: v11.13.0
Npm: v6.2.0
Installing script dependencies
Installing apm
apm 2.1.3
npm 6.2.0
node 8.9.3 x64
atom unknown
python 2.7.6
git 1.9.1
Installing modules ✓
Wrote Dependencies Fingerprint: /home/akaash/Git/atom/node_modules/.dependencies-fingerprint ca389ceea6eb46e44ef746c336b27d844982eca3
Cleaning /home/akaash/Git/atom/out
Copying assets to /home/akaash/Git/atom/out/app
Transpiling packages with custom transpiler configurations in /home/akaash/Git/atom/out/app
transpiling for package github
Installing modules ✓
Transpiling Babel paths in /home/akaash/Git/atom/out/app
Transpiling CoffeeScript paths in /home/akaash/Git/atom/out/app
Transpiling CSON paths in /home/akaash/Git/atom/out/app
Transpiling PEG.js paths in /home/akaash/Git/atom/out/app
Generating module cache for /home/akaash/Git/atom/out/app
Generating pre-built less cache in /home/akaash/Git/atom/out/app/less-compile-cache
Generating metadata for /home/akaash/Git/atom/out/app/package.json
Generating API docs at /home/akaash/Git/atom/docs/output/atom-api.json
Dumping symbols in /home/akaash/Git/atom/out/symbols
Running electron-packager on /home/akaash/Git/atom/out/app with app name “atom”
[============================================>] 100.0% of 48.67 MB (7.21 MB/s)
Packaging app for platform linux x64 using electron v2.0.18
Changing permissions for node files in /home/akaash/Git/atom/out/atom-beta-1.36.0-beta2-amd64
Copying non-ASAR resources to /home/akaash/Git/atom/out/atom-beta-1.36.0-beta2-amd64/resources
Writing to /home/akaash/Git/atom/out/atom-beta-1.36.0-beta2-amd64/resources
Application bundle created at /home/akaash/Git/atom/out/atom-beta-1.36.0-beta2-amd64

Minifying startup script
Verifying if snapshot can be executed via mksnapshot
Generating startup blob at “/home/akaash/Git/atom/out/snapshot_blob.bin”
Error: spawnSync /home/akaash/Git/atom/script/node_modules/electron-mksnapshot/bin/mksnapshot ENOENT
at Object.spawnSync (internal/child_process.js:1021:20)
at spawnSync (child_process.js:622:24)
at Object.execFileSync (child_process.js:650:13)
at electronLink.then (/home/akaash/Git/atom/script/lib/generate-startup-snapshot.js:102:18)

When I read Packaging app for platform..., I was beginning to hope it would work. But then came the Error: spawnSync message. With all the previous errors I could at least get some idea of what went wrong and try to find a way to fix it, which is why script/build has grown progressively to that beast I mentioned above. However, with this error I have no idea what it means and how to deal with it.

I would really appreciate any help with this.

did you ever resolve this? this was posted 2 years ago, I am currently having this issue myself…
$ script/build --build-dir /tmp/atom-build/ --install
Node: v16.0.0
throw err;

<ref *1> Error: spawnSync npm ENOENT
at Object.spawnSync (node:internal/child_process:1086:20)
at spawnSync (node:child_process:693:24)
at Object.execFileSync (node:child_process:720:15)
at verifyNpm (/home/chris/atom/script/lib/verify-machine-requirements.js:32:31)
at module.exports (/home/chris/atom/script/lib/verify-machine-requirements.js:10:3)
at Object. (/home/chris/atom/script/bootstrap:29:1)
at Module._compile (node:internal/modules/cjs/loader:1108:14)
at Object.Module._extensions…js (node:internal/modules/cjs/loader:1137:10)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Function.Module._load (node:internal/modules/cjs/loader:828:14) {
errno: -2,
code: ‘ENOENT’,
syscall: ‘spawnSync npm’,
path: ‘npm’,
spawnargs: [ ‘–version’ ],
error: [Circular *1],
status: null,
signal: null,
output: null,
pid: 4513,
stdout: null,
stderr: null
is my resulting output from my attempt… gonna check back later im exhausted… am on arch linux if that matters. yes I have all dependencies though I love being wrong so please hailp! lol thx in advance all.
May your worlds be filled with peace, love and harmony!

Do you have NodeJS and npm installed? The message suggests that the latter is not installed or not in your PATH. FYI: npm comes with NodeJS.