Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Unable to build Atom on Fedora 19; script/build fails. #2731

Closed
wei2912 opened this issue Jun 24, 2014 · 17 comments
Closed

Unable to build Atom on Fedora 19; script/build fails. #2731

wei2912 opened this issue Jun 24, 2014 · 17 comments
Labels
build-error linux Issues that occur on Linux but not on other platforms. stale

Comments

@wei2912
Copy link

wei2912 commented Jun 24, 2014

[wei2912@localhost atom]$ script/build
Node: v0.10.29
npm: v1.4.14
Installing build modules...
npm WARN package.json theorist@1.0.1 No README data
Installing apm...
/bin/sh: /home/wei2912/Workspace/atom/atom/build/node_modules/.bin/npm: No such file or directory

Info is as follows:

[wei2912@localhost atom]$ node -v
v0.10.29
[wei2912@localhost atom]$ npm -v
1.4.14
@kevinsawicki
Copy link
Contributor

Can you try running script/clean and then run script/build again?

@wei2912
Copy link
Author

wei2912 commented Jun 24, 2014

Here goes:

[wei2912@localhost atom]$ script/build
Node: v0.10.29
npm: v1.4.14
Installing build modules...
npm WARN engine specificity@0.1.3: wanted: {"node":"~0.8.x"} (current: {"node":"v0.10.29","npm":"1.4.14"})
../src/handle_map.cc: In member function ‘bool HandleMap::Erase(WatcherHandle)’:
../src/handle_map.cc:21:26: warning: ‘void NanDispose(v8::Persistent<S>&) [with T = v8::Value]’ is deprecated (declared at ../node_modules/nan/nan.h:612) [-Wdeprecated-declarations]
   NanDispose(iter->second);
                          ^
../src/handle_map.cc: In member function ‘void HandleMap::Clear()’:
../src/handle_map.cc:28:28: warning: ‘void NanDispose(v8::Persistent<S>&) [with T = v8::Value]’ is deprecated (declared at ../node_modules/nan/nan.h:612) [-Wdeprecated-declarations]
     NanDispose(iter->second);
                            ^
npm WARN engine specificity@0.1.3: wanted: {"node":"~0.8.x"} (current: {"node":"v0.10.29","npm":"1.4.14"})
Installing apm...
/bin/sh: /home/wei2912/Workspace/atom/atom/build/node_modules/.bin/npm: No such file or directory

@kevinsawicki
Copy link
Contributor

Does the folder /home/wei2912/Workspace/atom/atom/build/node_modules/npm exist?

@kevinsawicki
Copy link
Contributor

And also does the /home/wei2912/Workspace/atom/atom/build/node_modules/npm/bin/npm file exist?

@wei2912
Copy link
Author

wei2912 commented Jul 14, 2014

/home/wei2912/Workspace/atom/atom/build/node_modules/npm doesn't exist.

@nicolasdanelon
Copy link

I have exactly the same problem .. what is the correct solution?

@kevinsawicki
Copy link
Contributor

@wei2912 and @nicolasdanelon Are you still seeing this issue on the latest master branch when running script/clean followed by a script/build?

@wei2912
Copy link
Author

wei2912 commented Sep 11, 2014

@kevinsawicki Sorry for the late response. The build still fails.

[wei2912@localhost atom]$ script/clean
[wei2912@localhost atom]$ script/build
Node: v0.10.29
npm: v1.4.14
Installing build modules...
npm WARN package.json atom-build@ No README data
Installing apm...
npm WARN package.json github-url-from-git@1.1.1 No repository field.
Installing modules ✗
> atom@0.127.0 preinstall /home/wei2912/Workspace/atom/atom
> node -e 'process.exit(0)'


> scrollbar-style@1.0.2 install /home/wei2912/Workspace/atom/atom/node_modules/scrollbar-style
> node-gyp rebuild


> nslog@1.0.1 install /home/wei2912/Workspace/atom/atom/node_modules/nslog
> node-gyp rebuild


> runas@1.0.1 install /home/wei2912/Workspace/atom/atom/node_modules/runas
> node-gyp rebuild


> oniguruma@3.0.4 install /home/wei2912/Workspace/atom/atom/node_modules/oniguruma
> node-gyp rebuild


> pathwatcher@2.1.1 install /home/wei2912/Workspace/atom/atom/node_modules/pathwatcher
> node-gyp rebuild


> git-utils@2.1.4 install /home/wei2912/Workspace/atom/atom/node_modules/git-utils
> node-gyp rebuild


npm WARN deprecated guid@0.0.10: Please use node-uuid instead. It is much better.
npm WARN engine specificity@0.1.3: wanted: {"node":"~0.8.x"} (current: {"node":"v0.10.30","npm":"1.4.4"})
Traceback (most recent call last):
  File "/home/wei2912/Workspace/atom/atom/apm/node_modules/atom-package-manager/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 18, in <module>
    sys.exit(gyp.script_main())
AttributeError: 'module' object has no attribute 'script_main'
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/home/wei2912/Workspace/atom/atom/apm/node_modules/atom-package-manager/node_modules/npm/node_modules/node-gyp/lib/configure.js:337:16)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Linux 3.14.17-100.fc19.x86_64
gyp ERR! command "node" "/home/wei2912/Workspace/atom/atom/apm/node_modules/atom-package-manager/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/wei2912/Workspace/atom/atom/node_modules/scrollbar-style
gyp ERR! node -v v0.10.30
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok 

Traceback (most recent call last):
  File "/home/wei2912/Workspace/atom/atom/apm/node_modules/atom-package-manager/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 18, in <module>
    sys.exit(gyp.script_main())
AttributeError: 'module' object has no attribute 'script_main'
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/home/wei2912/Workspace/atom/atom/apm/node_modules/atom-package-manager/node_modules/npm/node_modules/node-gyp/lib/configure.js:337:16)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Linux 3.14.17-100.fc19.x86_64
gyp ERR! command "node" "/home/wei2912/Workspace/atom/atom/apm/node_modules/atom-package-manager/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/wei2912/Workspace/atom/atom/node_modules/nslog
gyp ERR! node -v v0.10.30
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok 
npm ERR! scrollbar-style@1.0.2 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the scrollbar-style@1.0.2 install script.
npm ERR! This is most likely a problem with the scrollbar-style package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls scrollbar-style
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.14.17-100.fc19.x86_64
npm ERR! command "/home/wei2912/Workspace/atom/atom/apm/node_modules/atom-package-manager/bin/node" "/home/wei2912/Workspace/atom/atom/apm/node_modules/atom-package-manager/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/home/wei2912/Workspace/atom/atom/apm/node_modules/atom-package-manager/.apmrc" "--userconfig" "/home/wei2912/.atom/.apmrc" "install" "--target=0.16.0" "--arch=x64" "--quiet"
npm ERR! cwd /home/wei2912/Workspace/atom/atom
npm ERR! node -v v0.10.30
npm ERR! npm -v 1.4.4
npm ERR! code ELIFECYCLE
Traceback (most recent call last):
  File "/home/wei2912/Workspace/atom/atom/apm/node_modules/atom-package-manager/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 18, in <module>
    sys.exit(gyp.script_main())
AttributeError: 'module' object has no attribute 'script_main'
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/home/wei2912/Workspace/atom/atom/apm/node_modules/atom-package-manager/node_modules/npm/node_modules/node-gyp/lib/configure.js:337:16)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Linux 3.14.17-100.fc19.x86_64
gyp ERR! command "node" "/home/wei2912/Workspace/atom/atom/apm/node_modules/atom-package-manager/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/wei2912/Workspace/atom/atom/node_modules/runas
gyp ERR! node -v v0.10.30
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok 
Traceback (most recent call last):
  File "/home/wei2912/Workspace/atom/atom/apm/node_modules/atom-package-manager/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 18, in <module>
    sys.exit(gyp.script_main())
AttributeError: 'module' object has no attribute 'script_main'
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/home/wei2912/Workspace/atom/atom/apm/node_modules/atom-package-manager/node_modules/npm/node_modules/node-gyp/lib/configure.js:337:16)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Linux 3.14.17-100.fc19.x86_64
gyp ERR! command "node" "/home/wei2912/Workspace/atom/atom/apm/node_modules/atom-package-manager/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/wei2912/Workspace/atom/atom/node_modules/oniguruma
gyp ERR! node -v v0.10.30
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok 
Traceback (most recent call last):
  File "/home/wei2912/Workspace/atom/atom/apm/node_modules/atom-package-manager/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 18, in <module>
    sys.exit(gyp.script_main())
AttributeError: 'module' object has no attribute 'script_main'
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/home/wei2912/Workspace/atom/atom/apm/node_modules/atom-package-manager/node_modules/npm/node_modules/node-gyp/lib/configure.js:337:16)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Linux 3.14.17-100.fc19.x86_64
gyp ERR! command "node" "/home/wei2912/Workspace/atom/atom/apm/node_modules/atom-package-manager/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/wei2912/Workspace/atom/atom/node_modules/pathwatcher
gyp ERR! node -v v0.10.30
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok 
npm WARN engine specificity@0.1.3: wanted: {"node":"~0.8.x"} (current: {"node":"v0.10.30","npm":"1.4.4"})
Traceback (most recent call last):
  File "/home/wei2912/Workspace/atom/atom/apm/node_modules/atom-package-manager/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 18, in <module>
    sys.exit(gyp.script_main())
AttributeError: 'module' object has no attribute 'script_main'
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/home/wei2912/Workspace/atom/atom/apm/node_modules/atom-package-manager/node_modules/npm/node_modules/node-gyp/lib/configure.js:337:16)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Linux 3.14.17-100.fc19.x86_64
gyp ERR! command "node" "/home/wei2912/Workspace/atom/atom/apm/node_modules/atom-package-manager/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/wei2912/Workspace/atom/atom/node_modules/git-utils
gyp ERR! node -v v0.10.30
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok 
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/wei2912/Workspace/atom/atom/npm-debug.log
npm ERR! not ok code 0

@kevinsawicki
Copy link
Contributor

@wei2912 That seems like the issue here: nodejs/node-gyp#363 where the wrong python version is being used, python 2.6 should be used.

You might want to try the fix here: nodejs/node-gyp#363 (comment)

@stellarhopper
Copy link

I'm seeing the same issue on Fedora 20, and sounds like it is not easy/recommended to have a co-install of python 2.6 (yum depends on python 2.7)

@ardeshirj
Copy link
Contributor

Also you may have gyp installed which conflict with node-gyp. You may want to remove it first before your build atom.

@l4sh
Copy link

l4sh commented Nov 9, 2014

as ardeshirj said, it is necessary to remove gyp before building.

Build instructions should be updated to something like this

sudo yum --assumeyes install make gcc gcc-c++ glibc-devel git-core libgnome-keyring-devel rpmdevtools

sudo yum -y install npm

git clone https://github.com/atom/atom
cd atom

git fetch
git checkout $(git describe --tags `git rev-list --tags --max-count=1`)

npm install npm

sudo yum -y remove gyp

script/build 
sudo grunt install

@ardeshirj
Copy link
Contributor

I understand you may want to build and install from scratch, but just FYI now there is a rpm package for every new release, so you don't have to bother to build and install every time.

As far as the documentation for linux goes, we can update it to remove gyp before running the build script, but it would be nice to check if we need to include this for Ubuntu or not.

@l4sh
Copy link

l4sh commented Nov 10, 2014

The rpm package is x64, people running x86 systems (like myself) can't install unless they build it.

@suranands
Copy link

I am really struggling with similar issues in installing atom. And I am not really good with CLI errors. Please help.

$ script/build 
Node: v0.12.4
npm: v2.10.1
Installing build modules...
npm ERR! git clone --template=/home/anand/.atom/.npm/_git-remotes/_templates --mirror https://github.com/atom/grunt-coffeelint.git /home/anand/.atom/.npm/_git-remotes/https-github-com-atom-grunt-coffeelint-git-25e0e49f: Cloning into bare repository '/home/anand/.atom/.npm/_git-remotes/https-github-com-atom-grunt-coffeelint-git-25e0e49f'...
npm ERR! git clone --template=/home/anand/.atom/.npm/_git-remotes/_templates --mirror https://github.com/atom/grunt-coffeelint.git /home/anand/.atom/.npm/_git-remotes/https-github-com-atom-grunt-coffeelint-git-25e0e49f: error: RPC failed; result=56, HTTP code = 200
npm ERR! git clone --template=/home/anand/.atom/.npm/_git-remotes/_templates --mirror https://github.com/atom/grunt-coffeelint.git /home/anand/.atom/.npm/_git-remotes/https-github-com-atom-grunt-coffeelint-git-25e0e49f: fatal: The remote end hung up unexpectedly
npm ERR! git clone --template=/home/anand/.atom/.npm/_git-remotes/_templates --mirror https://github.com/atom/grunt-coffeelint.git /home/anand/.atom/.npm/_git-remotes/https-github-com-atom-grunt-coffeelint-git-25e0e49f: fatal: protocol error: bad pack header
npm ERR! Linux 3.13.0-27-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "--userconfig=/home/anand/atom/build/.npmrc" "install" "--loglevel" "error"
npm ERR! node v0.12.4
npm ERR! npm  v2.10.1
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! syscall getaddrinfo

npm ERR! network getaddrinfo ENOTFOUND registry.npmjs.org
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network 
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

npm ERR! Please include the following file with any support request:
npm ERR!     /home/anand/atom/build/npm-debug.log

@stale stale bot added the stale label May 30, 2017
@stale
Copy link

stale bot commented May 30, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot closed this as completed Jun 29, 2017
@lock
Copy link

lock bot commented Mar 31, 2018

This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!

@lock lock bot locked and limited conversation to collaborators Mar 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
build-error linux Issues that occur on Linux but not on other platforms. stale
Projects
None yet
Development

No branches or pull requests

7 participants