Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

apm-beta fails to install some packages if Atom Beta is installed but not Atom #499

Closed
JustinAiken opened this issue Jan 27, 2016 · 6 comments · Fixed by #673
Closed

apm-beta fails to install some packages if Atom Beta is installed but not Atom #499

JustinAiken opened this issue Jan 27, 2016 · 6 comments · Fixed by #673

Comments

@JustinAiken
Copy link

Example and logs at https://discuss.atom.io/t/node-gyp-fails-to-do-stuff-if-atom-beta-is-installed-but-not-atom/24967/2

@hedefalk
Copy link

I get the same issue on apm-beta even though I have both atom/atom beta installed: https://discuss.atom.io/t/failed-to-activate-because-native-module/27234/5?u=hedefalk

@alexheyd
Copy link

Hi, I came here from this thread: https://discuss.atom.io/t/node-gyp-fails-to-do-stuff-if-atom-beta-is-installed-but-not-atom/24967

Is there any update to this? I'm having a similar issue, but I also have regular Atom installed in addition to Atom Beta. Installing from within Atom Beta and apm-beta results in the same error:

> ctags@3.0.0 install /private/var/folders/wn/82x0bb7d425ggvqr9nvx55xxd4mt_j/T/apm-install-dir-116521-26994-uyiswq/node_modules/jump-to-import/node_modules/symbols-view/node_modules/ctags
> node-gyp rebuild


make: *** No rule to make target `../../../../../../../../../../../../../../Applications/Atom', needed by `Makefile'.  Stop.
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Applications/Atom Beta.app/Contents/Resources/app/apm/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System Darwin 14.5.0
gyp ERR! command "node" "/Applications/Atom Beta.app/Contents/Resources/app/apm/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /private/var/folders/wn/82x0bb7d425ggvqr9nvx55xxd4mt_j/T/apm-install-dir-116521-26994-uyiswq/node_modules/jump-to-import/node_modules/symbols-view/node_modules/ctags
gyp ERR! node -v v0.10.40
gyp ERR! node-gyp -v v2.0.2
gyp ERR! not ok
npm ERR! Darwin 14.5.0
npm ERR! argv "/Applications/Atom Beta.app/Contents/Resources/app/apm/bin/node" "/Applications/Atom Beta.app/Contents/Resources/app/apm/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/Users/aheyd/.atom/.apm/.apmrc" "--userconfig" "/Users/aheyd/.atom/.apmrc" "install" "/private/var/folders/wn/82x0bb7d425ggvqr9nvx55xxd4mt_j/T/d-116521-26994-2yxap4/package.tgz" "--target=0.37.8" "--arch=x64"
npm ERR! node v0.10.40
npm ERR! npm  v2.13.3
npm ERR! code ELIFECYCLE

npm ERR! ctags@3.0.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ctags@3.0.0 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the ctags 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 ctags
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /private/var/folders/wn/82x0bb7d425ggvqr9nvx55xxd4mt_j/T/apm-install-dir-116521-26994-uyiswq/npm-debug.log

The package is my own, and it installs fine in regular Atom. apm-beta rebuild didn't make a difference.

@viddo
Copy link

viddo commented Oct 18, 2016

I'm also experiencing this issue. I've set up an example package with a single dependency that fails with Atom beta:

$ apm-beta install https://github.com/viddo/reproduce-apm-beta-install-fail.git
Cloning https://github.com/viddo/reproduce-apm-beta-install-fail.git ✓
Installing modules ✗
> fsevents@1.0.14 install /private/var/folders/cf/2l8bklvj1l7fj6_hhr41zk880000gn/T/atom-git-package-clone-116918-36647-1778e5w/node_modules/fsevents
> node-pre-gyp install --fallback-to-build

Failed to execute '/Applications/Atom Beta.app/Contents/Resources/app/apm/bin/node /Applications/Atom Beta.app/Contents/Resources/app/apm/bin/../node_modules/.bin/node-gyp build --fallback-to-build --module=/private/var/folders/cf/2l8bklvj1l7fj6_hhr41zk880000gn/T/atom-git-package-clone-116918-36647-1778e5w/node_modules/fsevents/lib/binding/Release/electron-v1.3-darwin-x64/fse.node --module_name=fse --module_path=/private/var/folders/cf/2l8bklvj1l7fj6_hhr41zk880000gn/T/atom-git-package-clone-116918-36647-1778e5w/node_modules/fsevents/lib/binding/Release/electron-v1.3-darwin-x64' (1)

node-pre-gyp ERR! Tried to download: https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.0.14/fse-v1.0.14-electron-v1.3-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for fsevents@1.0.14 and electron@1.3.6 (electron-v1.3 ABI) (falling back to source compile with node-gyp)
make: *** No rule to make target `../../../../../../../../../../Applications/Atom', needed by `Makefile'.  Stop.
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Applications/Atom Beta.app/Contents/Resources/app/apm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 14.5.0

Normal apm works fine:

$ apm install https://github.com/viddo/reproduce-apm-beta-install-fail.git
Cloning https://github.com/viddo/reproduce-apm-beta-install-fail.git ✓
Installing modules ✓
Moving reproduce-apm-beta-install-fail to /Users/viddo/.atom/packages/reproduce-apm-beta-install-fail

edit:

  • Using Mac OSX Yosemite v10.10.5
  • Have both Atom and Atom beta installed (latest versions at the time of writing)

@viddo
Copy link

viddo commented Oct 19, 2016

atom/node-spellchecker#39 is probably also related from the look of it

@viddo
Copy link

viddo commented Oct 19, 2016

After some more digging I found another issue with a similar symptom: atom/atom#3147 As mentioned in the last comment:

This is not an Atom bug. This is a bug in node-gyp (or one of its dependencies). There's an open issue for it. First reported back in May, 2012... 😢

Giving the proposed solution in that thread (symlink) yields another but similar error: make: *** No rule to make target Beta.app/Contents/Resources/app/apm/node_modules/node-gyp/addon.gypi. The temporary workaround I found for now is to rename the application to /Applications/AtomBeta.app and install shell commands again. After these steps the install works properly:

$ apm-beta install https://github.com/viddo/reproduce-apm-beta-install-fail.git
Cloning https://github.com/viddo/reproduce-apm-beta-install-fail.git ✓
Installing modules ✓
Moving reproduce-apm-beta-install-fail to /Users/viddo/.atom/packages/reproduce-apm-beta-install-fail ✓

The proper solution would probably be to get this fixed in node-gyp obviously, but until then I figure this might be helpful for some.

@skull-squadron
Copy link

skull-squadron commented Oct 21, 2016

The temporary solution is for the beta app to be released with the name Atom-Beta.app. The LTS is for node-gyp to get their act together.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants