Open Aligedchud opened 1 year ago
The fix from #385 does not work when running script/bootstrap
command I get this error:
script/bootstrap
is deprecated. Use node script/bootstrap.js
instead
Node: v19.3.0
Python: v3.10.9
Installing script runner dependencies
Error: spawnSync npm ENOENT
at Object.spawnSync (node:internal/child_process:1117:20)
at spawnSync (node:child_process:871:24)
at Object.execFileSync (node:child_process:914:15)
at installScriptRunnerDependencies (/home/jj/atom/script/lib/install-script-runner-dependencies.js:9:16)
at bootstrap (/home/jj/atom/script/bootstrap.js:40:3)
at Object.node script/bootstrap.js
:
Node: v19.3.0
Python: v3.10.9
Installing script runner dependencies
Error: spawnSync npm ENOENT
at Object.spawnSync (node:internal/child_process:1117:20)
at spawnSync (node:child_process:871:24)
at Object.execFileSync (node:child_process:914:15)
at installScriptRunnerDependencies (/home/jj/atom/script/lib/install-script-runner-dependencies.js:9:16)
at bootstrap (/home/jj/atom/script/bootstrap.js:40:3)
at Object.
I also don't have the .atom folder or the node-modules in the atom/apm folder
(Based on https://github.com/atom-community/atom/blob/master/script/bootstrap.cmd the deprecation error doesn't affect anything.)
This is purely a guess because the issue author says the build process has been simplified, but maybe your node version is too recent. Last I remember Atom used an old version of node (based on my build script, v14)
(The issue is still open so it seems this probably isn't really a solution.)
Though if you're just trying to download Atom (not build), there is https://github.com/atom-community/atom/blob/master/docs/Installation.md which is also mentioned in the issue.
The important bit of the error from the top of the post is
Error: There was a fatal error while downloading/extracting the tarball
I'm not sure what would cause that, but if it was just a corrupted download over the network, trying to run it again should resolve it.
The second error:
Error: spawnSync npm ENOENT
Says you have no npm
executable on your system (Edit: Or at least no npm
on the PATH in whatever context you're running the build from).
Please install npm
on your system so it is accessible on the PATH somewhere. The build scripts for atom-community/atom
download two copies of npm
, one under script/node_modules
, and one under script/script-runner/node_modules
, but both of them need npm
to be on your PATH and working in order to run. (So, you need both npm
and node
on your PATH somewhere, probably).
General note about Arch: The Arch build process sometimes tries to extract things like npm
, node
and electron
into their own system packages, and various other changes from the build scripts as they're written here. Anyone providing steps to build that from AUR are putting their own custom steps together to do it "the Arch way". But these are not provided by maintainers here, and they are not guaranteed to work. Folks here may provide some help getting them to work, but the main way to build this repo is the scripts exactly as they are provided in this repo itself. This should hopefully "just work" on Arch, if you have the needed dependencies installed, but is not specifically tested on Arch.
After I downloaded npm
I ran the command node script/bootstrap.js
and I get a different error:
https://imgur.com/a/XfVRvlG
@Aligedchud two things:
node-gyp
writes to process.config
, which used to be allowed, but is now deprecated and apparently hard-removed in the latest NodeJS 19?? See this related issue: https://github.com/nodejs/node-gyp/pull/2368
. The fix is in node-gyp 8.2.0 and later. But this project use node-gyp v5.xYou can post the error messages like this, if you want to avoid making super long posts that make it harder to scroll through the issue:
<details><summary>error message (click to expand):</summary>
$ command you ran
[output here ...]
</details>
Or post to a pastebin type of site, etc.
@Aligedchud try building atom after setting the env variable below:
ATOM_ELECTRON_URL='https://artifacts.electronjs.org/headers/dist'
Where do I set the env variable or what command would I or do I add it in the atom.sh
If you use bash shell run the command below to build atom:
ATOM_ELECTRON_URL='https://artifacts.electronjs.org/headers/dist' script/build
If you use fish shell run the command below to build atom:
env ATOM_ELECTRON_URL='https://artifacts.electronjs.org/headers/dist' script/build
I ran the command ATOM_ELECTRON_URL='https://artifacts.electronjs.org/headers/dist' script/build
and the modules installed successfully but it skipped the install:
Skipping installation. Specify the --install option to install Atom
@Aligedchud atom was build successfully, you can run it using the executable created in the out
directory. I don't recommend you use the --install option. If you want to install it on your system it is better to use a PKGBUILD.
But if you want to install it using the atom scripts, use:
ATOM_ELECTRON_URL='https://artifacts.electronjs.org/headers/dist' script/build --install
So if anyone wants to build and install atom on arch follow the steps below:
Clone the repository
git clone https://github.com/atom-community/atom.git
Build atom debian package
sudo pacman -S dpkg # required to build debian package
cd atom ATOM_RELEASE_VERSION=1.63.0 ATOM_ELECTRON_URL='https://artifacts.electronjs.org/headers/dist' script/build --create-debian-package
3. Create a `PKGBUILD` file in the `out` directory with the contents below:
```bash
pkgname="atom-bin"
pkgver=1.63.0
pkgrel=1
pkgdesc="Community build of the hackable text editor"
arch=("x86_64")
url="https://github.com/atom-community/atom"
license=("MIT")
depends=("libxkbfile" "ripgrep")
provides=("atom" "apm")
source=("atom-amd64.deb")
sha256sums=('SKIP')
prepare() {
bsdtar xf data.tar.xz
}
package() {
mv usr "$pkgdir"
}
cd out
makepkg -si
I did a clean clone of the atom.git and ran the commands above I get this after I run makepkg -si
The build script did not create a debian package, make sure you have dpkg
installed and redo steps 2-4:
sudo pacman -S dpkg
I did all of the steps again and get this error at the makepkg -si
command
Slight tangent, but I want to mention this here: Now that https://github.com/atom-community/apm/pull/124 is merged, I do intend to update apm at this repo to include that fix, if that's alright.
I know more people watch this repo than the atom-community/apm
repo, so I thought I'd mention it here before I try to do that.
Hello I am using Arch Linux, kernel version 6.1.3, everything is up to date
The Yay build is not working it has the error message as shown below: https://imgur.com/a/xYaHe2D
I tried the PKG-BUILD from the AUR link: https://aur.archlinux.org/atom-community-git.git to see if yay was broken After git cloning it and running command makepkg -f PKGBUILD I get the same error message