Failed to activate because native module


#1

I get this on beta 1.7.0-beta

Failed to require the main module of ‘Ensime’ because it requires an incompatible native module.
Run apm rebuild in the package directory to resolve.

but running apm rebuild doesn’t help. Is this because I’m running an old apm from 1.6.0? (which I have installed too)

It loads in 1.6.0…

I thought this was related to apm rebuild not working described here: https://github.com/strongloop/fsevents/issues/93#issuecomment-202830164

but after replacing chokidar/fsevents with gaze and successfully running apm rebuild, I still have the same problem.


Apm using ancient versions of node/npm and I can't seem to fix it…?
#2

Have you tried using apm-beta rebuild?


#3

I did now!

It isn’t working though. I can run apm-beta reload on my atom package fine, but it doesn’t help - I still get the same error upon loading the package in atom-beta.

My package depends on a node module of my own, which I have npm linked on my dev machine here. So the weird think I don’t understand is that I can run apm-beta reload on the main package, but NOT on the dependency because it has a transitive devDependency on fsevents from grunt-ts:

~/d/p/ensime-node ❯❯❯ apm-beta rebuild master
Rebuilding modules ✗
npm WARN prefer global coffee-script@1.10.0 should be installed with -g
npm WARN prefer global jasmine-node@1.10.2 should be installed with -g
npm WARN prefer global typings@0.7.9 should be installed with -g
make: *** No rule to make target ../../../../../../../../../../Applications/Atom', needed byMakefile’. 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 15.3.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 /Users/viktor/dev/projects/ensime-node/node_modules/grunt-ts/node_modules/fsevents
gyp ERR! node -v v0.10.40
gyp ERR! node-gyp -v v2.0.2
gyp ERR! not ok

npm ERR! Darwin 15.3.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/viktor/.atom/.apm/.apmrc” “–userconfig” “/Users/viktor/.atom/.apmrc” “rebuild” “–target=0.36.8” "–arch=x64"
npm ERR! node v0.10.40
npm ERR! npm v2.13.3
npm ERR! code ELIFECYCLE
npm ERR! fsevents@0.3.8 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fsevents@0.3.8 install script ‘node-gyp rebuild’.
npm ERR! This is most likely a problem with the fsevents 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 fsevents
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /Users/viktor/dev/projects/ensime-node/npm-debug.log

So why does it follow ensime-node/ -> grunt-ts -> fsevents

but not

ensime-atom -> ensime-node -> grunt-ts -> fsevents

Because it’s a soft link? Because limit depth 2? Or just something I don’t understand :slight_smile:


#4

That part I don’t know. You’ll probably have to file an Issue about that. If/when you do, please @mention me on it so I can make sure the right people see it.


#5

Linked you on a related issue. The link-stuff here was probably some hickup from me where I accidentally did npm install on the main package which will overwrite the softlink from npm link.

Anyway, the apm-beta rebuild fails, while apm rebuild doesn’t:

~/d/p/atom-ensime ❯❯❯ apm rebuild master :arrow_up:
Rebuilding modules ✓
~/d/p/atom-ensime ❯❯❯ apm-beta rebuild master :arrow_up:
Rebuilding modules ✗
make: *** No rule to make target ../../../../../../../../Applications/Atom', needed byMakefile’. 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 15.3.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 /Users/viktor/dev/projects/atom-ensime/node_modules/fsevents
gyp ERR! node -v v0.10.40
gyp ERR! node-gyp -v v2.0.2
gyp ERR! not ok

npm ERR! Darwin 15.3.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/viktor/.atom/.apm/.apmrc” “–userconfig” “/Users/viktor/.atom/.apmrc” “rebuild” “–target=0.36.8” "–arch=x64"
npm ERR! node v0.10.40
npm ERR! npm v2.13.3
npm ERR! code ELIFECYCLE
npm ERR! fsevents@0.3.8 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fsevents@0.3.8 install script ‘node-gyp rebuild’.
npm ERR! This is most likely a problem with the fsevents 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 fsevents
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /Users/viktor/dev/projects/atom-ensime/npm-debug.log